mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
29 lines
1.8 KiB
Diff
29 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
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 04d8cfd0ef3cb9c60e93136376ae90144f3cb7ce..a31a6bb5cd42485a0ada8220f3d0eea15de67ef8 100644
|
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
@@ -177,7 +177,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;
|
|
@@ -192,7 +192,7 @@ public final class ItemStack implements DataComponentHolder {
|
|
registryfriendlybytebuf.writeVarInt(itemstack.getCount());
|
|
// Spigot start - filter
|
|
itemstack = itemstack.copy();
|
|
- CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack));
|
|
+ // 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
|
|
DataComponentPatch.STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.components.asPatch());
|