diff options
author | Nassim Jahnke <[email protected]> | 2024-12-03 19:05:31 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-12-03 19:05:31 +0100 |
commit | ab9a3db5ba76384531ad52299344dea588a367b2 (patch) | |
tree | 7e91be513aa8e62596b332a159691d67f79323c7 /patches/server/0222-Remove-unnecessary-itemmeta-handling.patch | |
parent | 172c7dc7e7ee96fceaa2586d9cd9d892184f9a39 (diff) | |
download | Paper-ab9a3db5ba76384531ad52299344dea588a367b2.tar.gz Paper-ab9a3db5ba76384531ad52299344dea588a367b2.zip |
More work
Diffstat (limited to 'patches/server/0222-Remove-unnecessary-itemmeta-handling.patch')
-rw-r--r-- | patches/server/0222-Remove-unnecessary-itemmeta-handling.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/server/0222-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0222-Remove-unnecessary-itemmeta-handling.patch new file mode 100644 index 0000000000..85d3bc9a5e --- /dev/null +++ b/patches/server/0222-Remove-unnecessary-itemmeta-handling.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Tue, 22 Nov 2016 00:40:42 -0500 +Subject: [PATCH] Remove unnecessary itemmeta handling + + +diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java +index 1db50e72ad8e04e54bed9b462bd7276feb06ce4c..1e16482830556cf34f3b68fc2af8216663b075e4 100644 +--- a/src/main/java/net/minecraft/world/item/ItemStack.java ++++ b/src/main/java/net/minecraft/world/item/ItemStack.java +@@ -166,7 +166,7 @@ public final class ItemStack implements DataComponentHolder { + + // 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; +@@ -180,8 +180,8 @@ public final class ItemStack implements DataComponentHolder { + } else { + registryfriendlybytebuf.writeVarInt(itemstack.getCount()); + // 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 |