mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Fix #113 - Lobotomized villagers wont restock
This commit is contained in:
@@ -18,10 +18,10 @@ index 13227c558b..330ac6cf85 100644
|
||||
public float yaw;
|
||||
public float pitch;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 823155821b..d882c1136a 100644
|
||||
index 823155821b..5d25c42d52 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -187,11 +187,23 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -187,15 +187,28 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
@@ -45,6 +45,19 @@ index 823155821b..d882c1136a 100644
|
||||
boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0;
|
||||
if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick)
|
||||
// Purpur end
|
||||
if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
|
||||
+ else checkRestock(); // Purpur
|
||||
this.world.getMethodProfiler().exit();
|
||||
if (this.bF) {
|
||||
this.bF = false;
|
||||
@@ -361,6 +374,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
return this.bD == 0 || this.bD < 2 && this.world.getTime() > this.bC + 2400L;
|
||||
}
|
||||
|
||||
+ public boolean checkRestock() { return fc(); } // Purpur - OBFHELPER
|
||||
public boolean fc() {
|
||||
long i = this.bC + 12000L;
|
||||
long j = this.world.getTime();
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index b92ca4a6de..1208464fba 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
|
||||
Reference in New Issue
Block a user