mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Reset spawner timer when spawner event is cancelled (#819)
This commit is contained in:
parent
0e9f94b07a
commit
568f82f3f8
1 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
|||
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/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index a5b5ef0f..b5c9c28a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract {
|
||||
{
|
||||
entity.fromMobSpawner = true;
|
||||
}
|
||||
+
|
||||
+ flag = true; // Paper
|
||||
+
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
|
||||
continue;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract {
|
||||
entityinsentient.doSpawnEffect();
|
||||
}
|
||||
|
||||
- flag = true;
|
||||
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
||||
}
|
||||
}
|
||||
|
||||
--
|
Loading…
Reference in a new issue