mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2025-01-02 18:48:06 +01:00
parent
70a10132d0
commit
a8de222bc2
@ -24,7 +24,10 @@ public class LegacyEnchantmentRewriter {
|
|||||||
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()) {
|
||||||
Short newId = (Short) ((CompoundTag) enchantmentEntry).get("id").getValue();
|
Tag idTag = ((CompoundTag) enchantmentEntry).get("id");
|
||||||
|
if (idTag == null) continue;
|
||||||
|
|
||||||
|
short newId = ((Number) idTag.getValue()).shortValue();
|
||||||
String enchantmentName = enchantmentMappings.get(newId);
|
String enchantmentName = enchantmentMappings.get(newId);
|
||||||
if (enchantmentName != null) {
|
if (enchantmentName != null) {
|
||||||
enchantments.remove(enchantmentEntry);
|
enchantments.remove(enchantmentEntry);
|
||||||
|
Loading…
Reference in New Issue
Block a user