2020-04-22 00:06:30 +02:00
|
|
|
From 0a60c7d137249b42e32668e922eba7d6e637ace7 Mon Sep 17 00:00:00 2001
|
2017-08-08 05:25:59 +02:00
|
|
|
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
|
2020-04-22 00:06:30 +02:00
|
|
|
index ab5d83d3..c38295a0 100644
|
2017-08-08 05:25:59 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
2020-02-21 18:52:20 +01:00
|
|
|
@@ -142,6 +142,7 @@ public abstract class MobSpawnerAbstract {
|
2017-08-08 05:25:59 +02:00
|
|
|
}
|
2020-02-21 18:52:20 +01:00
|
|
|
entity.spawnedViaMobSpawner = true; // Paper
|
|
|
|
// Spigot Start
|
2017-08-08 05:25:59 +02:00
|
|
|
+ flag = true; // Paper
|
|
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
|
2018-09-15 18:10:26 +02:00
|
|
|
Entity vehicle = entity.getVehicle();
|
|
|
|
if (vehicle != null) {
|
2020-02-21 18:52:20 +01:00
|
|
|
@@ -160,7 +161,7 @@ public abstract class MobSpawnerAbstract {
|
2019-04-28 01:23:53 +02:00
|
|
|
((EntityInsentient) entity).doSpawnEffect();
|
2017-08-08 05:25:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- flag = true;
|
|
|
|
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2020-04-22 00:06:30 +02:00
|
|
|
2.25.1.windows.1
|
2017-08-08 05:25:59 +02:00
|
|
|
|