From 128c35000b15aea3cb6c03cb7d6a939307a244b2 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 7 Aug 2017 22:25:59 -0500 Subject: [PATCH] Reset spawner timer when spawner event is cancelled (#819) --- ...imer-when-spawner-event-is-cancelled.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Spigot-Server-Patches/0230-Reset-spawner-timer-when-spawner-event-is-cancelled.patch diff --git a/Spigot-Server-Patches/0230-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/Spigot-Server-Patches/0230-Reset-spawner-timer-when-spawner-event-is-cancelled.patch new file mode 100644 index 000000000..53ce415d1 --- /dev/null +++ b/Spigot-Server-Patches/0230-Reset-spawner-timer-when-spawner-event-is-cancelled.patch @@ -0,0 +1,32 @@ +From 92617e0faa93936b619afc70bcc11c9f3d5e395e Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Mon, 31 Jul 2017 01:45:19 -0500 +Subject: [PATCH] Reset spawner timer when spawner event is cancelled + + +diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +index a5b5ef0f..b5c9c28a 100644 +--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java ++++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +@@ -112,6 +112,9 @@ public abstract class MobSpawnerAbstract { + { + entity.fromMobSpawner = true; + } ++ ++ flag = true; // Paper ++ + if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) { + continue; + } +@@ -122,7 +125,7 @@ public abstract class MobSpawnerAbstract { + entityinsentient.doSpawnEffect(); + } + +- flag = true; ++ /*flag = true;*/ // Paper - moved up above cancellable event + } + } + +-- +2.11.0 +