Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-26 16:12:43 +01:00
Add sanity check to enchantment nbt check
Dieser Commit ist enthalten in:
Ursprung
1c4b27e56c
Commit
4a360bac44
@ -63,7 +63,10 @@ public class EnchantmentRewriter {
|
|||||||
ListTag remappedEnchantments = new ListTag(nbtTagName + "|" + key, CompoundTag.class);
|
ListTag remappedEnchantments = new ListTag(nbtTagName + "|" + key, CompoundTag.class);
|
||||||
List<Tag> lore = new ArrayList<>();
|
List<Tag> lore = new ArrayList<>();
|
||||||
for (Tag enchantmentEntry : enchantments.clone()) {
|
for (Tag enchantmentEntry : enchantments.clone()) {
|
||||||
String newId = (String) ((CompoundTag) enchantmentEntry).get("id").getValue();
|
Tag idTag = ((CompoundTag) enchantmentEntry).get("id");
|
||||||
|
if (idTag == null) continue;
|
||||||
|
|
||||||
|
String newId = (String) idTag.getValue();
|
||||||
String enchantmentName = enchantmentMappings.get(newId);
|
String enchantmentName = enchantmentMappings.get(newId);
|
||||||
if (enchantmentName != null) {
|
if (enchantmentName != null) {
|
||||||
enchantments.remove(enchantmentEntry);
|
enchantments.remove(enchantmentEntry);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren