2018-03-31 18:51:21 +00:00
|
|
|
From bfb645af77354320d1f86b3da34c0c9c92aa495c Mon Sep 17 00:00:00 2001
|
2017-08-08 03:25:59 +00:00
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
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
|
2018-03-31 18:51:21 +00:00
|
|
|
index 1ed0def1..87fe4775 100644
|
2017-08-08 03:25:59 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
2017-08-09 18:44:28 +00:00
|
|
|
@@ -113,6 +113,9 @@ public abstract class MobSpawnerAbstract {
|
2017-08-08 03:25:59 +00:00
|
|
|
{
|
|
|
|
entity.fromMobSpawner = true;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ flag = true; // Paper
|
|
|
|
+
|
|
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
|
|
|
|
continue;
|
|
|
|
}
|
2017-08-09 18:44:28 +00:00
|
|
|
@@ -123,7 +126,7 @@ public abstract class MobSpawnerAbstract {
|
2017-08-08 03:25:59 +00:00
|
|
|
entityinsentient.doSpawnEffect();
|
|
|
|
}
|
|
|
|
|
|
|
|
- flag = true;
|
|
|
|
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2018-03-31 18:51:21 +00:00
|
|
|
2.14.3
|
2017-08-08 03:25:59 +00:00
|
|
|
|