WrappedVillagerData cannot resolve Vanilla VillagerType
kennytv opened this issue · 1 comments
Describe the bug
On a 1.18.2 server, WrappedVillagerData cannot get the nms VillagerType (and profession?) from the Bukkit counterpart
To Reproduce
final WrappedVillagerData wrappedVillagerData = WrappedVillagerData.fromValues(WrappedVillagerData.Type.PLAINS, WrappedVillagerData.Profession.NONE, 1);
Unable to find field PLAINS in class net.minecraft.world.entity.npc.VillagerType.
java.lang.IllegalArgumentException: Unable to find field PLAINS in class net.minecraft.world.entity.npc.VillagerType.
at com.comphenix.protocol.reflect.ExactReflection.getField(ExactReflection.java:115) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.reflect.ExactReflection.getField(ExactReflection.java:114) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.reflect.ExactReflection.getField(ExactReflection.java:99) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.reflect.accessors.Accessors.getFieldAccessor(Accessors.java:87) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.EnumWrappers$FauxEnumConverter.getGeneric(EnumWrappers.java:912) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.EnumWrappers$FauxEnumConverter.getGeneric(EnumWrappers.java:893) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.WrappedVillagerData.fromValues(WrappedVillagerData.java:53) ~[ProtocolLib.jar:?]
Version Info
https://paste.gg/p/anonymous/97703081f9ae43d7996a3c5efe238069