Add missing Villager.Type parameter, rename methods to setBiome and deprecate old.
This commit is contained in:
parent
0972e74d17
commit
92a85194fb
@ -28,10 +28,19 @@ public class VillagerWatcher extends AbstractVillagerWatcher {
|
||||
return getVillagerData().getProfession();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Villager.Type getType() {
|
||||
return getVillagerData().getType();
|
||||
}
|
||||
|
||||
public Villager.Type getBiome() {
|
||||
return getType();
|
||||
}
|
||||
|
||||
public void setBiome(Villager.Type type) {
|
||||
setType(type);
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return getVillagerData().getLevel();
|
||||
}
|
||||
@ -40,6 +49,7 @@ public class VillagerWatcher extends AbstractVillagerWatcher {
|
||||
setVillagerData(new VillagerData(getType(), profession, getLevel()));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setType(Villager.Type type) {
|
||||
setVillagerData(new VillagerData(type, getProfession(), getLevel()));
|
||||
}
|
||||
|
@ -59,11 +59,21 @@ public class ZombieVillagerWatcher extends ZombieWatcher {
|
||||
setVillagerData(new VillagerData(getType(), profession, getLevel()));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setType(Villager.Type type) {
|
||||
setVillagerData(new VillagerData(type, getProfession(), getLevel()));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setLevel(int level) {
|
||||
setVillagerData(new VillagerData(getType(), getProfession(), getLevel()));
|
||||
}
|
||||
|
||||
public Villager.Type getBiome() {
|
||||
return getType();
|
||||
}
|
||||
|
||||
public void setBiome(Villager.Type type) {
|
||||
setType(type);
|
||||
}
|
||||
}
|
||||
|
@ -1546,8 +1546,10 @@ public class DisguiseUtilities {
|
||||
|
||||
((Set<Object>) trackedPlayersObj).add(ReflectionManager.getNmsEntity(player));
|
||||
} else {
|
||||
((Map<Object, Object>) ReflectionManager.getNmsField("EntityTrackerEntry", "trackedPlayerMap")
|
||||
.get(entityTrackerEntry)).put(ReflectionManager.getNmsEntity(player), true);
|
||||
Field field = ReflectionManager.getNmsField("EntityTrackerEntry", "trackedPlayerMap");
|
||||
Object nmsEntity = ReflectionManager.getNmsEntity(player);
|
||||
Map<Object, Object> map = ((Map<Object, Object>) field.get(entityTrackerEntry));
|
||||
map.put(nmsEntity, true);
|
||||
}
|
||||
|
||||
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
|
||||
|
@ -40,7 +40,9 @@ public class ParamInfoTypes {
|
||||
"View all the colors you can use for a horses color"));
|
||||
|
||||
paramInfos.add(new ParamInfoEnum(Villager.Profession.class, "Villager Profession",
|
||||
"View all the professions you can set on a Zombie and Normal Villager"));
|
||||
"View all the professions you can set on a Villager and Zombie Villager"));
|
||||
paramInfos.add(new ParamInfoEnum(Villager.Type.class, "Villager Biome",
|
||||
"View all the biomes you can set on a Villager and Zombie Villager"));
|
||||
paramInfos.add(new ParamInfoEnum(BlockFace.class, "Direction", "Direction (North, East, South, West, Up, Down)",
|
||||
"View the directions usable on player setSleeping and shulker direction",
|
||||
Arrays.copyOf(BlockFace.values(), 6)));
|
||||
|
Loading…
Reference in New Issue
Block a user