mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-05 10:20:11 +01:00
Restore behavior tree before calling warden ai
This commit is contained in:
parent
372d209be1
commit
d532dae514
@ -82,17 +82,17 @@ public class WardenController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void customServerAiStep() {
|
||||
if (npc != null) {
|
||||
if (npc.useMinecraftAI()) {
|
||||
super.customServerAiStep();
|
||||
} else {
|
||||
NMSImpl.updateAI(this);
|
||||
}
|
||||
NMSImpl.updateMinecraftAIState(npc, this);
|
||||
npc.update();
|
||||
} else {
|
||||
if (npc == null) {
|
||||
super.customServerAiStep();
|
||||
return;
|
||||
}
|
||||
NMSImpl.updateMinecraftAIState(npc, this);
|
||||
if (npc.useMinecraftAI()) {
|
||||
super.customServerAiStep();
|
||||
} else {
|
||||
NMSImpl.updateAI(this);
|
||||
}
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user