Clear goals on behavior change for villagers

This commit is contained in:
fullwall 2019-08-07 23:47:02 +08:00
parent d6ee1e0025
commit 2322cacb40
2 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,6 @@ public class PigController extends MobEntityController {
public static class EntityPigNPC extends EntityPig implements NPCHolder {
boolean calledNMSHeight = false;
private final CitizensNPC npc;
public EntityPigNPC(EntityTypes<? extends EntityPig> types, World world) {

View File

@ -235,6 +235,7 @@ public class VillagerController extends MobEntityController {
}
if (this.behaviorMap.size() > 0) {
this.behaviorMap.clear();
NMSImpl.clearGoals(goalSelector, targetSelector);
}
}
super.mobTick();