PaperMC/Spigot-Server-Patches/0230-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
Aikar 71c18fd5c9
Add PlayerProfile API to replace GameProfile
This simply provides the base API to create the objects. Further commits will come that adds
adds usage of this API to existing GameProfile based API's, as well as new API's.
2018-01-18 23:19:30 -05:00

32 lines
1.3 KiB
Diff

From 8157ea3db7e48a39c5810f391a16f25d81f7e5eb 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 06b064a78..c29df55fa 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -113,6 +113,9 @@ public abstract class MobSpawnerAbstract {
{
entity.fromMobSpawner = true;
}
+
+ flag = true; // Paper
+
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
continue;
}
@@ -123,7 +126,7 @@ public abstract class MobSpawnerAbstract {
entityinsentient.doSpawnEffect();
}
- flag = true;
+ /*flag = true;*/ // Paper - moved up above cancellable event
}
}
--
2.15.1