aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1040-Fix-ItemFlags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/1040-Fix-ItemFlags.patch')
-rw-r--r--patches/server/1040-Fix-ItemFlags.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/1040-Fix-ItemFlags.patch b/patches/server/1040-Fix-ItemFlags.patch
index 0e894f8bc2..8d1a1d818b 100644
--- a/patches/server/1040-Fix-ItemFlags.patch
+++ b/patches/server/1040-Fix-ItemFlags.patch
@@ -33,7 +33,7 @@ index fca0cfba14dd2cc6f24b56eaf269594b2d87fd04..8734f0b777432cd8639094b75a3da1b9
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d272a1362c3 100644
+index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba245d169f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -224,6 +224,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -119,7 +119,7 @@ index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d27
for (Map.Entry<DataComponentType<?>, Optional<?>> e : this.unhandledTags.build().entrySet()) {
e.getValue().ifPresentOrElse((value) -> {
itemTag.builder.set((DataComponentType) e.getKey(), value);
-@@ -859,7 +901,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -862,7 +904,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Overridden
boolean isEmpty() {
@@ -128,7 +128,7 @@ index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d27
}
// Paper start
-@@ -1468,6 +1510,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1471,6 +1513,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hasFood() ? that.hasFood() && this.food.equals(that.food) : !that.hasFood())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
&& (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage())
@@ -137,7 +137,7 @@ index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d27
&& (this.version == that.version);
}
-@@ -1510,6 +1554,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1513,6 +1557,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
hash = 61 * hash + (this.hasDamage() ? this.damage : 0);
hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237);
hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
@@ -146,7 +146,7 @@ index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d27
hash = 61 * hash + this.version;
return hash;
}
-@@ -1547,6 +1593,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1550,6 +1596,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.damage = this.damage;
clone.maxDamage = this.maxDamage;
clone.version = this.version;
@@ -161,7 +161,7 @@ index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d27
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
-@@ -1656,6 +1710,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1659,6 +1713,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@@ -178,7 +178,7 @@ index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d27
if (!this.unhandledTags.isEmpty()) {
Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new);
try {
-@@ -1666,6 +1730,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1669,6 +1733,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -193,7 +193,7 @@ index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d27
if (!this.persistentDataContainer.isEmpty()) { // Store custom tags, wrapped in their compound
builder.put(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT, this.persistentDataContainer.serialize());
-@@ -1807,6 +1879,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1810,6 +1882,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaItem.MAX_DAMAGE.TYPE,
CraftMetaItem.CUSTOM_DATA.TYPE,
CraftMetaItem.ATTRIBUTES.TYPE,