3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Fix enchantment level

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-03-17 10:47:12 +01:00
Ursprung 5899886b42
Commit 9ca02680c8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -74,6 +74,9 @@ final class StructuredDataConverter {
private static final Map<StructuredDataKey<?>, DataConverter<?>> REWRITERS = new Reference2ObjectOpenHashMap<>();
static {
register(StructuredDataKey.CUSTOM_DATA, (data, tag) -> {
// Handled manually
});
register(StructuredDataKey.DAMAGE, (data, tag) -> tag.putInt("Damage", data));
register(StructuredDataKey.UNBREAKABLE, (data, tag) -> {
tag.putBoolean("Unbreakable", true);
@ -524,7 +527,7 @@ final class StructuredDataConverter {
final CompoundTag enchantment = new CompoundTag();
enchantment.putString("id", identifier);
enchantment.putShort("lvl", (short) entry.getIntKey());
enchantment.putShort("lvl", (short) entry.getIntValue());
enchantments.add(enchantment);
}
tag.put(storedEnchantments ? "StoredEnchantments" : "Enchantments", enchantments);