From 4fa7e1c31d8f2b8dd3ec002563f11c4136f15491 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 10 Dec 2022 21:48:22 +1100 Subject: [PATCH] SPIGOT-7200: CreatureSpawnEvent is called with incorrect SpawnReason when using spawn eggs --- nms-patches/net/minecraft/world/entity/EntityTypes.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/net/minecraft/world/entity/EntityTypes.patch b/nms-patches/net/minecraft/world/entity/EntityTypes.patch index bfd56ba27..1a398aa2d 100644 --- a/nms-patches/net/minecraft/world/entity/EntityTypes.patch +++ b/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();