Paper/patches/server-remapped/0165-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
Mariell Hoversholm a207d14a0e
Rename all patches to correct numbering scheme
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 15:46:44 +02:00

28 lines
1.4 KiB
Diff

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/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 7541155048744a9af2017ec039cf99a246addb0b..4582fc1bb767214241568fbc22b0ee2cbf3322e0 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -161,6 +161,7 @@ public abstract class BaseSpawner {
// Spigot End
}
entity.spawnedViaMobSpawner = true; // Paper
+ flag = true; // Paper
// Spigot Start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
Entity vehicle = entity.getVehicle();
@@ -184,7 +185,7 @@ public abstract class BaseSpawner {
((Mob) entity).spawnAnim();
}
- flag = true;
+ /*flag = true;*/ // Paper - moved up above cancellable event
}
}
}