summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityZombie.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityZombie.patch')
-rw-r--r--nms-patches/EntityZombie.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/nms-patches/EntityZombie.patch b/nms-patches/EntityZombie.patch
index b85809fe..1a0a9240 100644
--- a/nms-patches/EntityZombie.patch
+++ b/nms-patches/EntityZombie.patch
@@ -17,7 +17,7 @@
protected static final IAttribute c = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
@@ -21,6 +30,7 @@
- private int bJ;
+ private int drownedConversionTime;
private float bK;
private float bL;
+ private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
@@ -28,15 +28,15 @@
public void tick() {
if (!this.world.isClientSide) {
-- if (this.dG()) {
-- --this.bJ;
+- if (this.isDrownConverting()) {
+- --this.drownedConversionTime;
+ // CraftBukkit start - Use wall time instead of ticks for conversion
-+ if (this.dG() && this.isAlive()) {
++ if (this.isDrownConverting() && this.isAlive()) {
+ int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
+ this.lastTick = MinecraftServer.currentTick;
-+ this.bJ -= elapsedTicks;
++ this.drownedConversionTime -= elapsedTicks;
+ // CraftBukkit end
- if (this.bJ < 0) {
+ if (this.drownedConversionTime < 0) {
this.dE();
}
@@ -182,7 +196,14 @@