mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Remove unnecessary itemmeta handling
This commit is contained in:
parent
394e4c04f7
commit
223c6c3b5a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user