3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00
Paper/patches/server/0155-Reset-spawner-timer-when-spawner-event-is-cancelled.patch

28 Zeilen
1.3 KiB
Diff

2021-06-12 13:18:01 +02:00
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/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
2021-11-30 08:32:30 +01:00
index 1c5865ee2a9f3b142d92d63c19ffd785ffcf1235..9c27f69f5b8e95ee56428a597e67dc4e8beb6d29 100644
2021-06-12 13:18:01 +02:00
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
2021-11-23 15:03:50 +01:00
@@ -158,6 +158,7 @@ public abstract class BaseSpawner {
2021-06-12 14:58:17 +02:00
// Spigot End
}
entity.spawnedViaMobSpawner = true; // Paper
+ flag = true; // Paper
// Spigot Start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
Entity vehicle = entity.getVehicle();
2021-11-23 15:03:50 +01:00
@@ -181,7 +182,7 @@ public abstract class BaseSpawner {
2021-06-12 13:18:01 +02:00
((Mob) entity).spawnAnim();
}
- flag = true;
+ //flag = true; // Paper - moved up above cancellable event
}
}