mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Fix mis-placed processEnchantOrder from 1.18 update (#7052)
This commit is contained in:
parent
6de2d9794c
commit
f065566460
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start
|
||||
+ private static final java.util.Comparator<? super CompoundTag> 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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user