From d43def7954f4ed67ff7c1620ecb3fa48eb89e01c Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 4 Jul 2020 19:54:39 -0600 Subject: [PATCH] Incorrect spawn reason for monsters from spawner - Fixes #3708 (#3764) --- .../0344-Entity-getEntitySpawnReason.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch index 54596e5238..2b92c0fd1e 100644 --- a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch @@ -58,6 +58,18 @@ index c5abac3eb3f98a948ff7a3423cfcad70abae86ff..4502ea222d98872a4c33714a8c3149c6 // Paper end } catch (Throwable throwable) { +diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +index e2f5354709819e56f9bc66b8c8d5e095bc8387b4..df5ac3295ea64fa9bb15f0565610265d55651b87 100644 +--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java ++++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +@@ -162,6 +162,7 @@ public abstract class MobSpawnerAbstract { + // Spigot End + } + entity.spawnedViaMobSpawner = true; // Paper ++ entity.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER; // Paper + // Spigot Start + flag = true; // Paper + if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index 61d29dabf6ae8be8f8b5b6da9b801e84adda7dfb..6a00d1dcd62034c595723547afb4637e9d7c18a0 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java