diff options
author | Jake Potrebic <[email protected]> | 2023-06-08 21:53:37 -0700 |
---|---|---|
committer | Jake Potrebic <[email protected]> | 2023-06-08 21:53:37 -0700 |
commit | ea9fdc393ce0f6e44cdf6f6b4078ca1b3660e084 (patch) | |
tree | d98df63756fc0e039a91f3720cc5ab5bf63a9678 | |
parent | 0d969f0a1b907fdac8a6c8fe9291db7abc1f817a (diff) | |
download | Paper-ea9fdc393ce0f6e44cdf6f6b4078ca1b3660e084.tar.gz Paper-ea9fdc393ce0f6e44cdf6f6b4078ca1b3660e084.zip |
Ignore inline definitions of trim material & pattern
-rw-r--r-- | patches/server/0973-Ignore-inline-definitions-of-trim-material-pattern.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0973-Ignore-inline-definitions-of-trim-material-pattern.patch b/patches/server/0973-Ignore-inline-definitions-of-trim-material-pattern.patch new file mode 100644 index 0000000000..9b113e0bfe --- /dev/null +++ b/patches/server/0973-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 742d4039392403a75882f83bb2f64453898adf76..c92981aedebe934cefa1c96a0328fb91fe17acbc 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(TRIM.NBT)) { + CompoundTag trimCompound = tag.getCompound(TRIM.NBT); + +- if (trimCompound.contains(TRIM_MATERIAL.NBT) && trimCompound.contains(TRIM_PATTERN.NBT)) { ++ if (trimCompound.contains(TRIM_MATERIAL.NBT, net.minecraft.nbt.Tag.TAG_STRING) && trimCompound.contains(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(TRIM_MATERIAL.NBT))); + TrimPattern trimPattern = Registry.TRIM_PATTERN.get(NamespacedKey.fromString(trimCompound.getString(TRIM_PATTERN.NBT))); + |