fix villager not restocking while lobotomized, closes #1629

This commit is contained in:
granny
2025-01-17 15:49:26 -08:00
parent 1d0d781b22
commit a9bcd9f0c8
3 changed files with 11 additions and 10 deletions

View File

@@ -67,7 +67,7 @@
@Override
public Brain<Villager> getBrain() {
return (Brain<Villager>)super.getBrain();
@@ -289,11 +_,23 @@
@@ -289,11 +_,24 @@
// Paper start - EAR 2
this.customServerAiStep(level, false);
}
@@ -89,6 +89,7 @@
+ if (!inactive /*&& this.behaviorTick++ % this.activatedPriority == 0*/) {
+ this.getBrain().tick(level, this); // Paper - EAR 2
+ }
+ else if (this.isLobotomized && shouldRestock()) restock(); // Purpur - Lobotomize stuck villagers
+ // Pufferfish end
profilerFiller.pop();
if (this.assignProfessionWhenSpawned) {