testserver/Spigot-Server-Patches/0164-Reset-spawner-timer-wh...

28 lines
1.4 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
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-06-25 13:11:48 +00:00
index 5fda5be52ee7dbf29ac791d0f49326dd74ff2d08..efd4d2844c4ad638837a1fd971927758908e7db1 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -142,6 +142,7 @@ public abstract class MobSpawnerAbstract {
}
entity.spawnedViaMobSpawner = true; // Paper
// Spigot Start
+ flag = true; // Paper
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
Entity vehicle = entity.getVehicle();
if (vehicle != null) {
@@ -160,7 +161,7 @@ public abstract class MobSpawnerAbstract {
((EntityInsentient) entity).doSpawnEffect();
}
- flag = true;
+ /*flag = true;*/ // Paper - moved up above cancellable event
}
}