mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
Added missing null checks for CONTAINER_LOOT handler
This commit is contained in:
parent
9ca02680c8
commit
3fef71db2e
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user