[ci skip] Replace some magic values with constant references

This commit is contained in:
Nassim Jahnke
2024-01-04 14:38:26 +01:00
parent 0f3d126ce1
commit 635ece80cf
10 changed files with 17 additions and 17 deletions

View File

@@ -28,10 +28,10 @@ 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(@Nullable CompoundTag tag) {
+ if (tag == null || !tag.contains("Enchantments", 9)) {
+ if (tag == null || !tag.contains("Enchantments", net.minecraft.nbt.Tag.TAG_LIST)) {
+ return;
+ }
+ ListTag list = tag.getList("Enchantments", 10);
+ ListTag list = tag.getList("Enchantments", net.minecraft.nbt.Tag.TAG_COMPOUND);
+ if (list.size() < 2) {
+ return;
+ }