2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2017-08-08 03:25:59 +00: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
|
|
|
|
|
|
|
|
|
2021-03-16 07:19:45 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
|
|
|
index 43fcc001bb9815b352cb74af10290b2a4ccaa540..883c724fbb86a84ee903b5e7127f14726fe4cf24 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
|
|
|
@@ -161,6 +161,7 @@ public abstract class MobSpawnerAbstract {
|
2020-08-25 02:22:08 +00:00
|
|
|
// Spigot End
|
|
|
|
}
|
2020-02-21 17:52:20 +00:00
|
|
|
entity.spawnedViaMobSpawner = true; // Paper
|
2020-08-25 02:22:08 +00:00
|
|
|
+ flag = true; // Paper
|
|
|
|
// Spigot Start
|
|
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
|
|
|
|
Entity vehicle = entity.getVehicle();
|
2021-03-16 07:19:45 +00:00
|
|
|
@@ -184,7 +185,7 @@ public abstract class MobSpawnerAbstract {
|
2020-08-25 02:22:08 +00:00
|
|
|
((EntityInsentient) entity).doSpawnEffect();
|
|
|
|
}
|
2017-08-08 03:25:59 +00:00
|
|
|
|
2020-08-25 02:22:08 +00:00
|
|
|
- flag = true;
|
|
|
|
+ /*flag = true;*/ // Paper - moved up above cancellable event
|
|
|
|
}
|
2017-08-08 03:25:59 +00:00
|
|
|
}
|
|
|
|
}
|