2019-05-27 09:13:41 +00:00
|
|
|
From 7098a89418d9a77aeefb877af5fabd6f01789d6e 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
|
2019-05-27 09:13:41 +00:00
|
|
|
index 7d140a6f5..93fad14d3 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
|
2019-04-27 23:23:53 +00:00
|
|
|
@@ -139,6 +139,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()) {
|
2018-09-15 16:10:26 +00:00
|
|
|
Entity vehicle = entity.getVehicle();
|
|
|
|
if (vehicle != null) {
|
2019-04-27 23:23:53 +00:00
|
|
|
@@ -156,7 +159,7 @@ public abstract class MobSpawnerAbstract {
|
|
|
|
((EntityInsentient) entity).doSpawnEffect();
|
2017-08-08 03:25:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- flag = true;
|
|
|
|
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2019-03-20 01:46:00 +00:00
|
|
|
2.21.0
|
2017-08-08 03:25:59 +00:00
|
|
|
|