mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From e175a2606aa41ccdd34359e8ed80506380c74ae1 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 2b6b062c6..c76dbe74a 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()) {
|
|
continue;
|
|
}
|
|
@@ -131,7 +134,7 @@ public abstract class MobSpawnerAbstract {
|
|
entityinsentient.doSpawnEffect();
|
|
}
|
|
|
|
- flag = true;
|
|
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
|
}
|
|
}
|
|
|
|
--
|
|
2.18.0
|
|
|