mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Clear goals on behavior change for villagers
This commit is contained in:
parent
d6ee1e0025
commit
2322cacb40
@ -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) {
|
||||
|
@ -235,6 +235,7 @@ public class VillagerController extends MobEntityController {
|
||||
}
|
||||
if (this.behaviorMap.size() > 0) {
|
||||
this.behaviorMap.clear();
|
||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||
}
|
||||
}
|
||||
super.mobTick();
|
||||
|
Loading…
Reference in New Issue
Block a user