Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Handle int tag for enchantment level
Dieser Commit ist enthalten in:
Ursprung
7710261b70
Commit
95144266d2
@ -122,7 +122,7 @@ public class EnchantmentTranslator extends NbtItemStackTranslator {
|
||||
|
||||
private CompoundTag remapEnchantment(CompoundTag tag) {
|
||||
Tag javaEnchLvl = tag.get("lvl");
|
||||
if (!(javaEnchLvl instanceof ShortTag))
|
||||
if (!(javaEnchLvl instanceof ShortTag || javaEnchLvl instanceof IntTag))
|
||||
return null;
|
||||
|
||||
Tag javaEnchId = tag.get("id");
|
||||
@ -137,7 +137,7 @@ public class EnchantmentTranslator extends NbtItemStackTranslator {
|
||||
|
||||
CompoundTag bedrockTag = new CompoundTag("");
|
||||
bedrockTag.put(new ShortTag("id", (short) enchantment.ordinal()));
|
||||
bedrockTag.put(new ShortTag("lvl", ((ShortTag) javaEnchLvl).getValue()));
|
||||
bedrockTag.put(new ShortTag("lvl", ((Number) javaEnchLvl.getValue()).shortValue()));
|
||||
return bedrockTag;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren