3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-20 06:50:08 +01:00

Added missing null checks for CONTAINER_LOOT handler

Dieser Commit ist enthalten in:
FlorianMichael 2024-03-17 20:41:00 +01:00 committet von Nassim Jahnke
Ursprung 9ca02680c8
Commit 3fef71db2e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -278,8 +278,14 @@ final class StructuredDataConverter {
tag.put("BlockEntityTag", data); tag.put("BlockEntityTag", data);
}); });
register(StructuredDataKey.CONTAINER_LOOT, (data, tag) -> { register(StructuredDataKey.CONTAINER_LOOT, (data, tag) -> {
tag.put("LootTable", data.get("loot_table")); final Tag lootTable = data.get("loot_table");
tag.put("LootTableSeed", data.get("loot_table_seed")); if (lootTable != null) {
tag.put("LootTable", lootTable);
}
final Tag lootTableSeed = data.get("loot_table_seed");
if (lootTableSeed != null) {
tag.put("LootTableSeed", lootTableSeed);
}
}); });
register(StructuredDataKey.ENCHANTMENT_GLINT_OVERRIDE, (data, tag) -> { register(StructuredDataKey.ENCHANTMENT_GLINT_OVERRIDE, (data, tag) -> {
if (!data) { if (!data) {