diff --git a/src/main/java/at/petrak/hexcasting/common/misc/Brainsweeping.java b/src/main/java/at/petrak/hexcasting/common/misc/Brainsweeping.java index 805efff7..8988420c 100644 --- a/src/main/java/at/petrak/hexcasting/common/misc/Brainsweeping.java +++ b/src/main/java/at/petrak/hexcasting/common/misc/Brainsweeping.java @@ -7,6 +7,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.Brain; import net.minecraft.world.entity.npc.Villager; import net.minecraft.world.entity.npc.VillagerDataHolder; @@ -28,6 +29,9 @@ public class Brainsweeping { if (entity instanceof VillagerDataHolder) { entity.getPersistentData().putBoolean(TAG_BRAINSWEPT, true); + if (entity instanceof Mob mob) + mob.removeFreeWill(); + if (entity instanceof Villager villager) { Brain brain = villager.getBrain(); if (entity.level instanceof ServerLevel slevel) {