2018-08-26 20:11:49 +02:00
|
|
|
From d2a91d650e428d979607011c24efc0a2802d6b3d Mon Sep 17 00:00:00 2001
|
2017-08-08 05:25:59 +02: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-08-26 20:11:49 +02:00
|
|
|
index ef93f433d6..e4598d8314 100644
|
2017-08-08 05:25:59 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
2018-07-18 02:08:13 +02:00
|
|
|
@@ -121,6 +121,9 @@ public abstract class MobSpawnerAbstract {
|
2017-08-08 05:25:59 +02:00
|
|
|
{
|
|
|
|
entity.fromMobSpawner = true;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ flag = true; // Paper
|
|
|
|
+
|
|
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
|
|
|
|
continue;
|
|
|
|
}
|
2018-07-18 02:08:13 +02:00
|
|
|
@@ -131,7 +134,7 @@ public abstract class MobSpawnerAbstract {
|
2017-08-08 05:25:59 +02:00
|
|
|
entityinsentient.doSpawnEffect();
|
|
|
|
}
|
|
|
|
|
|
|
|
- flag = true;
|
|
|
|
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2018-07-04 09:55:24 +02:00
|
|
|
2.18.0
|
2017-08-08 05:25:59 +02:00
|
|
|
|