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 {
|
public static class EntityPigNPC extends EntityPig implements NPCHolder {
|
||||||
boolean calledNMSHeight = false;
|
boolean calledNMSHeight = false;
|
||||||
|
|
||||||
private final CitizensNPC npc;
|
private final CitizensNPC npc;
|
||||||
|
|
||||||
public EntityPigNPC(EntityTypes<? extends EntityPig> types, World world) {
|
public EntityPigNPC(EntityTypes<? extends EntityPig> types, World world) {
|
||||||
|
@ -235,6 +235,7 @@ public class VillagerController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
if (this.behaviorMap.size() > 0) {
|
if (this.behaviorMap.size() > 0) {
|
||||||
this.behaviorMap.clear();
|
this.behaviorMap.clear();
|
||||||
|
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.mobTick();
|
super.mobTick();
|
||||||
|
Loading…
Reference in New Issue
Block a user