From 0cb9e6122e496bec4eba1bec0a3d1a8c13155482 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 10 Dec 2022 21:48:22 +1100 Subject: [PATCH] SPIGOT-7200: CreatureSpawnEvent is called with incorrect SpawnReason when using spawn eggs By: md_5 --- .../net/minecraft/world/entity/EntityTypes.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/nms-patches/net/minecraft/world/entity/EntityTypes.patch b/paper-server/nms-patches/net/minecraft/world/entity/EntityTypes.patch index bfd56ba27b..1a398aa2dd 100644 --- a/paper-server/nms-patches/net/minecraft/world/entity/EntityTypes.patch +++ b/paper-server/nms-patches/net/minecraft/world/entity/EntityTypes.patch @@ -45,6 +45,15 @@ if (itemstack != null) { nbttagcompound = itemstack.getTag(); +@@ -342,7 +350,7 @@ + nbttagcompound = null; + } + +- return this.spawn(worldserver, nbttagcompound, consumer, blockposition, enummobspawn, flag, flag1); ++ return this.spawn(worldserver, nbttagcompound, consumer, blockposition, enummobspawn, flag, flag1, spawnReason); // CraftBukkit + } + + public static Consumer createDefaultStackConfig(WorldServer worldserver, ItemStack itemstack, @Nullable EntityHuman entityhuman) { @@ -363,21 +371,37 @@ NBTTagCompound nbttagcompound = itemstack.getTag();