Fixed Villager type not being rolled back correctly in MC 1.21+

This commit is contained in:
Intelli 2024-07-25 16:40:36 -06:00
parent fda87e2f6a
commit 888df067f9

View File

@ -338,7 +338,7 @@ public class EntityUtil {
}
}
else if (count == 1) {
if (abstractVillager instanceof Villager && value instanceof Villager.Type) {
if (abstractVillager instanceof Villager && (value instanceof Villager.Type || value instanceof String)) {
Villager villager = (Villager) abstractVillager;
if (value instanceof String) {
value = BukkitAdapter.ADAPTER.getRegistryValue((String) value, Villager.Type.class);