From 888df067f9693893593d40605ee536513dc00005 Mon Sep 17 00:00:00 2001 From: Intelli Date: Thu, 25 Jul 2024 16:40:36 -0600 Subject: [PATCH] Fixed Villager type not being rolled back correctly in MC 1.21+ --- src/main/java/net/coreprotect/utility/entity/EntityUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/coreprotect/utility/entity/EntityUtil.java b/src/main/java/net/coreprotect/utility/entity/EntityUtil.java index dcf43b85..98f8fe7a 100644 --- a/src/main/java/net/coreprotect/utility/entity/EntityUtil.java +++ b/src/main/java/net/coreprotect/utility/entity/EntityUtil.java @@ -338,7 +338,7 @@ else if (entity instanceof AbstractVillager) { } } 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);