PaperMC/Spigot-Server-Patches/0198-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
Zach Brown 8ed2992da9
Make scan-for-legacy-ender-dragon config work again
Portion of diff was dropped in the mappings update commit.

Also remove the option to remove invalid statistics. The server will
automatically do this now as of... 1.13?, our option wasn't even doing anything.
2018-12-14 20:17:27 -05:00

32 lines
1.3 KiB
Diff

From 57d7b3c61b1932a8b1e32158546d62f0e1007c82 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
index 98065d6b0..027ba7191 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -121,6 +121,9 @@ public abstract class MobSpawnerAbstract {
{
entity.fromMobSpawner = true;
}
+
+ flag = true; // Paper
+
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
Entity vehicle = entity.getVehicle();
if (vehicle != null) {
@@ -138,7 +141,7 @@ public abstract class MobSpawnerAbstract {
entityinsentient.doSpawnEffect();
}
- flag = true;
+ /*flag = true;*/ // Paper - moved up above cancellable event
}
}
--
2.20.0