From 8eef3b43f3dc3f2abd03f8c4478bf98f3ed93e07 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Wed, 29 Aug 2018 22:55:21 -0400 Subject: [PATCH] Ensure Creeper fuseTicks are still incremented Fixes GH-1389 Because we are no longer enabling creepers to rapidly change status every tick, in order to prevent event spam, their datawatcher value ends up negative. This datawatcher value is used to increment the fuseTicks within the creeper tick. Because the value is negative, it is constantly zero'd and therefore never incremented, instead acting the same as creepers that aren't ignited. We can just as easily increment this ourselves when the creeper is ignited, so that's what we'll do. --- Spigot-Server-Patches/Add-More-Creeper-API.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Add-More-Creeper-API.patch b/Spigot-Server-Patches/Add-More-Creeper-API.patch index bacbc4f754..0b3b81b6dc 100644 --- a/Spigot-Server-Patches/Add-More-Creeper-API.patch +++ b/Spigot-Server-Patches/Add-More-Creeper-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add More Creeper API diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java -index 19022b6e24..1729297766 100644 +index 19022b6e2..321e00cef 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { @@ -33,6 +33,15 @@ index 19022b6e24..1729297766 100644 int i = this.dz(); +@@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { + this.a(SoundEffects.ENTITY_CREEPER_PRIMED, 1.0F, 0.5F); + } + +- this.fuseTicks += i; ++ this.fuseTicks += this.isIgnited() ? 1 : i; // Paper - workaround now that we aren't letting it get re-set every tick - GH-1389 + if (this.fuseTicks < 0) { + this.fuseTicks = 0; + } @@ -0,0 +0,0 @@ public class EntityCreeper extends EntityMonster { return LootTables.x; } @@ -82,7 +91,7 @@ index 19022b6e24..1729297766 100644 public boolean canCauseHeadDrop() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java -index ffebb54caa..ab2b20a0d4 100644 +index ffebb54ca..ab2b20a0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java @@ -0,0 +0,0 @@ public class CraftCreeper extends CraftMonster implements Creeper {