diff --git a/paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch b/paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch index dbf1e0187a..9193b7da39 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch @@ -40,7 +40,7 @@ } else { boolean flag = false; RandomSource randomsource = world.getRandom(); -@@ -157,13 +164,25 @@ +@@ -157,13 +164,26 @@ ((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.SPAWNER, (SpawnGroupData) null); } @@ -59,6 +59,7 @@ - if (!world.tryAddFreshEntityWithPassengers(entity)) { + entity.spawnedViaMobSpawner = true; // Paper ++ flag = true; // Paper + // CraftBukkit start + if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) { + continue; @@ -68,3 +69,12 @@ this.delay(world, pos); return; } +@@ -174,7 +194,7 @@ + ((Mob) entity).spawnAnim(); + } + +- flag = true; ++ //flag = true; // Paper - moved up above cancellable event + } + } +