From 223c6c3b5a017777614dea2b184c4798c08d4ea9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 22 Nov 2016 00:40:42 -0500 Subject: [PATCH] Remove unnecessary itemmeta handling --- .../sources/net/minecraft/world/item/ItemStack.java.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch index 30333ebd21..cc2f0f9ca2 100644 --- a/paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch @@ -100,7 +100,7 @@ - return new ItemStack(holder, i, datacomponentpatch); + // CraftBukkit start + ItemStack itemstack = new ItemStack(holder, i, datacomponentpatch); -+ if (!datacomponentpatch.isEmpty()) { ++ if (false && !datacomponentpatch.isEmpty()) { // Paper - This is no longer needed with raw NBT being handled in metadata + CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); + } + return itemstack; @@ -116,8 +116,8 @@ registryfriendlybytebuf.writeVarInt(itemstack.getCount()); - null.ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder()); + // Spigot start - filter -+ itemstack = itemstack.copy(); -+ CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); ++ // itemstack = itemstack.copy(); ++ // CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); // Paper - This is no longer with raw NBT being handled in metadata + // Spigot end + ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder()); // CraftBukkit - decompile error + // Paper start - adventure; conditionally render translatable components