1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2024-12-28 07:20:24 +01:00
PaperMC/patches/server/0148-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
Nassim Jahnke ab9a3db5ba
More work
2024-12-03 19:05:31 +01:00

27 lines
1.3 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 e424c23c22809a307175b5dcc7f7b0084464493f..6c29e55239fdcf8df3b9dc012aa80cebcd3a837a 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -177,6 +177,7 @@ public abstract class BaseSpawner {
}
entity.spawnedViaMobSpawner = true; // Paper
+ flag = true; // Paper
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
continue;
@@ -193,7 +194,7 @@ public abstract class BaseSpawner {
((Mob) entity).spawnAnim();
}
- flag = true;
+ //flag = true; // Paper - moved up above cancellable event
}
}