aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch')
-rw-r--r--patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch b/patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch
new file mode 100644
index 0000000000..2b71534642
--- /dev/null
+++ b/patches/server/0948-Ignore-inline-definitions-of-trim-material-pattern.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Thu, 8 Jun 2023 21:51:50 -0700
+Subject: [PATCH] Ignore inline definitions of trim material & pattern
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
+index 24b87a1566b48be1367970a9ba887a6b3a785bb9..f393e0844889c967d9e83d9a1e73c134fcb6e33b 100644
+--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
+@@ -67,7 +67,7 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
+ if (tag.contains(CraftMetaArmor.TRIM.NBT)) {
+ CompoundTag trimCompound = tag.getCompound(CraftMetaArmor.TRIM.NBT);
+
+- if (trimCompound.contains(CraftMetaArmor.TRIM_MATERIAL.NBT) && trimCompound.contains(CraftMetaArmor.TRIM_PATTERN.NBT)) {
++ if (trimCompound.contains(CraftMetaArmor.TRIM_MATERIAL.NBT, net.minecraft.nbt.Tag.TAG_STRING) && trimCompound.contains(CraftMetaArmor.TRIM_PATTERN.NBT, net.minecraft.nbt.Tag.TAG_STRING)) { // Paper - for now, ignore inline definitions of trim material & pattern
+ TrimMaterial trimMaterial = Registry.TRIM_MATERIAL.get(NamespacedKey.fromString(trimCompound.getString(CraftMetaArmor.TRIM_MATERIAL.NBT)));
+ TrimPattern trimPattern = Registry.TRIM_PATTERN.get(NamespacedKey.fromString(trimCompound.getString(CraftMetaArmor.TRIM_PATTERN.NBT)));
+