3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Accept int tag in level

Dieser Commit ist enthalten in:
creeper123123321 2018-07-20 15:58:04 -03:00
Ursprung 9a1376dcb3
Commit 6c17615ecb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -321,7 +321,7 @@ public class InventoryPackets {
newId = "viaversion:legacy/"+oldId;
}
enchantmentEntry.put(new StringTag("id", newId));
enchantmentEntry.put(new ShortTag("lvl", (Short) ((CompoundTag) enchEntry).get("lvl").getValue()));
enchantmentEntry.put(new ShortTag("lvl", ((Number) ((CompoundTag) enchEntry).get("lvl").getValue()).shortValue()));
enchantments.add(enchantmentEntry);
}
}
@ -342,7 +342,7 @@ public class InventoryPackets {
enchantmentEntry.put(new StringTag("id",
newId
));
enchantmentEntry.put(new ShortTag("lvl", (Short) ((CompoundTag) enchEntry).get("lvl").getValue()));
enchantmentEntry.put(new ShortTag("lvl", ((Number) ((CompoundTag) enchEntry).get("lvl").getValue()).shortValue()));
newStoredEnch.add(enchantmentEntry);
}
}