aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0151-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0151-Reset-spawner-timer-when-spawner-event-is-cancelled.patch')
-rw-r--r--patches/server/0151-Reset-spawner-timer-when-spawner-event-is-cancelled.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0151-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/patches/server/0151-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
new file mode 100644
index 0000000000..129e8461dc
--- /dev/null
+++ b/patches/server/0151-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
@@ -0,0 +1,27 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: BillyGalbreath <[email protected]>
+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/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
+index 43d399e1a0ba2fb0541f851a28032fa60fc01b33..31fe2faf9137ac8b1acca9a5ffc5bbcc8aab16c1 100644
+--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
++++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
+@@ -177,6 +177,7 @@ public abstract class BaseSpawner {
+ }
+
+ entity.spawnedViaMobSpawner = true; // Paper
++ flag = true; // Paper
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
+ continue;
+@@ -193,7 +194,7 @@ public abstract class BaseSpawner {
+ ((Mob) entity).spawnAnim();
+ }
+
+- flag = true;
++ //flag = true; // Paper - moved up above cancellable event
+ }
+ }
+