3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-20 06:50:10 +01:00
Dieser Commit ist enthalten in:
KennyTV 2021-02-17 12:24:20 +01:00
Ursprung 15348f659a
Commit 5c1c7940a3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -641,7 +641,10 @@ public class BlockItemPackets1_13 extends nl.matsv.viabackwards.api.rewriters.It
boolean hasValidEnchants = false;
for (Tag enchantmentEntryTag : enchantments.clone()) {
CompoundTag enchantmentEntry = (CompoundTag) enchantmentEntryTag;
String newId = (String) enchantmentEntry.get("id").getValue();
Tag idTag = enchantmentEntry.get("id");
if (!(idTag instanceof StringTag)) continue;
String newId = (String) idTag.getValue();
Number levelValue = (Number) enchantmentEntry.get("lvl").getValue();
int intValue = levelValue.intValue();
short level = intValue < Short.MAX_VALUE ? levelValue.shortValue() : Short.MAX_VALUE;