it's too perfect

this commit changes nothing
but like
come on
This commit is contained in:
yrsegal@gmail.com 2022-04-24 23:41:06 -04:00
parent 8d351b494e
commit 3bc769ebfb

View file

@ -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<Villager> brain = villager.getBrain();
if (entity.level instanceof ServerLevel slevel) {