From f065566460c77a8850c8b0dcd4a80134c997eb5d Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Mon, 6 Dec 2021 12:28:36 -0800 Subject: [PATCH] Fix mis-placed processEnchantOrder from 1.18 update (#7052) --- patches/server/Handle-Item-Meta-Inconsistencies.patch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/patches/server/Handle-Item-Meta-Inconsistencies.patch b/patches/server/Handle-Item-Meta-Inconsistencies.patch index c9afeb790d..347ddc3ece 100644 --- a/patches/server/Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/Handle-Item-Meta-Inconsistencies.patch @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + private static final java.util.Comparator enchantSorter = java.util.Comparator.comparing(o -> o.getString("id")); -+ private void processEnchantOrder(CompoundTag tag) { ++ private void processEnchantOrder(@Nullable CompoundTag tag) { + if (tag == null || !tag.contains("Enchantments", 9)) { + return; + } @@ -62,7 +62,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.getItem().verifyTagAfterLoad(this.tag); } -+ processEnchantOrder(this.tag); // Paper +@@ -0,0 +0,0 @@ public final class ItemStack { + + public void setTag(@Nullable CompoundTag nbt) { + this.tag = nbt; ++ this.processEnchantOrder(this.tag); // Paper if (this.getItem().canBeDepleted()) { this.setDamageValue(this.getDamageValue()); }