From b365899587dbf44f2489e1779f7a32340a167aa6 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 10 Jun 2024 14:06:36 +1000 Subject: [PATCH] SPIGOT-7736: Creative spawn egg use loses components By: md_5 --- .../nms-patches/net/minecraft/world/item/ItemStack.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-server/nms-patches/net/minecraft/world/item/ItemStack.patch b/paper-server/nms-patches/net/minecraft/world/item/ItemStack.patch index 8d97c3b087..84a2ad4a2f 100644 --- a/paper-server/nms-patches/net/minecraft/world/item/ItemStack.patch +++ b/paper-server/nms-patches/net/minecraft/world/item/ItemStack.patch @@ -103,7 +103,7 @@ Item item = this.getItem(); - EnumInteractionResult enuminteractionresult = item.useOn(itemactioncontext); + // CraftBukkit start - handle all block place event logic here -+ DataComponentPatch oldData = this.getComponentsPatch(); ++ DataComponentPatch oldData = this.components.asPatch(); + int oldCount = this.getCount(); + WorldServer world = (WorldServer) itemactioncontext.getLevel(); + @@ -120,7 +120,7 @@ + } finally { + world.captureBlockStates = false; + } -+ DataComponentPatch newData = this.getComponentsPatch(); ++ DataComponentPatch newData = this.components.asPatch(); + int newCount = this.getCount(); + this.setCount(oldCount); + this.restorePatch(oldData);