mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-23 17:08:00 +01:00
Add sanity check to enchantment nbt check
This commit is contained in:
parent
1c4b27e56c
commit
4a360bac44
@ -63,7 +63,10 @@ public class EnchantmentRewriter {
|
||||
ListTag remappedEnchantments = new ListTag(nbtTagName + "|" + key, CompoundTag.class);
|
||||
List<Tag> lore = new ArrayList<>();
|
||||
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);
|
||||
if (enchantmentName != null) {
|
||||
enchantments.remove(enchantmentEntry);
|
||||
|
Loading…
Reference in New Issue
Block a user