2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 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
|
2020-08-25 04:22:08 +02:00
|
|
|
index 8eb20c6b9a88d5d4056f91df1f496d3d35b473da..34ab03fce7ab5c7702234590ffc9ca7fec72a86a 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
|
2020-08-25 04:22:08 +02:00
|
|
|
@@ -144,6 +144,7 @@ public abstract class MobSpawnerAbstract {
|
|
|
|
// Spigot End
|
|
|
|
}
|
2020-02-21 18:52:20 +01:00
|
|
|
entity.spawnedViaMobSpawner = true; // Paper
|
2020-08-25 04:22:08 +02:00
|
|
|
+ flag = true; // Paper
|
|
|
|
// Spigot Start
|
|
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
|
|
|
|
Entity vehicle = entity.getVehicle();
|
|
|
|
@@ -167,7 +168,7 @@ public abstract class MobSpawnerAbstract {
|
|
|
|
((EntityInsentient) entity).doSpawnEffect();
|
|
|
|
}
|
2017-08-08 05:25:59 +02:00
|
|
|
|
2020-08-25 04:22:08 +02:00
|
|
|
- flag = true;
|
|
|
|
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
|
|
|
}
|
2017-08-08 05:25:59 +02:00
|
|
|
}
|
|
|
|
}
|