aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0151-Reset-spawner-timer-when-spawner-event-is-cancelled.patch
blob: 9b68ceeb8c8504ee1ad813048bf37808c1a24a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
index 38abf49a86b0d33c6069c6a2b95edeb6c7019eb4..5bf68b03ddfc7c9554c467e2c0588084a796f6fa 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -158,6 +158,7 @@ public abstract class BaseSpawner {
                             // 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();
@@ -181,7 +182,7 @@ public abstract class BaseSpawner {
                             ((Mob) entity).spawnAnim();
                         }
 
-                        flag = true;
+                        //flag = true; // Paper - moved up above cancellable event
                     }
                 }