Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Wrap BASE_COLOR, CONTAINER_LOOT and CONTAINER inside block entity tag in 1.20.5->.3 (#3892)
Closes https://github.com/ViaVersion/ViaBackwards/issues/763
Dieser Commit ist enthalten in:
Ursprung
76abe4432f
Commit
03e8eec12e
@ -216,7 +216,7 @@ public final class StructuredDataConverter {
|
|||||||
tag.putString("filtered_title", data.title().filtered());
|
tag.putString("filtered_title", data.title().filtered());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
register(StructuredDataKey.BASE_COLOR, (data, tag) -> tag.putInt("Base", data));
|
register(StructuredDataKey.BASE_COLOR, (data, tag) -> getBlockEntityTag(tag).putInt("Base", data));
|
||||||
register(StructuredDataKey.CHARGED_PROJECTILES, (connection, data, tag) -> convertItemList(connection, data, tag, "ChargedProjectiles"));
|
register(StructuredDataKey.CHARGED_PROJECTILES, (connection, data, tag) -> convertItemList(connection, data, tag, "ChargedProjectiles"));
|
||||||
register(StructuredDataKey.BUNDLE_CONTENTS, (connection, data, tag) -> convertItemList(connection, data, tag, "Items"));
|
register(StructuredDataKey.BUNDLE_CONTENTS, (connection, data, tag) -> convertItemList(connection, data, tag, "Items"));
|
||||||
register(StructuredDataKey.LODESTONE_TRACKER, (data, tag) -> {
|
register(StructuredDataKey.LODESTONE_TRACKER, (data, tag) -> {
|
||||||
@ -361,11 +361,11 @@ public final class StructuredDataConverter {
|
|||||||
register(StructuredDataKey.CONTAINER_LOOT, (data, tag) -> {
|
register(StructuredDataKey.CONTAINER_LOOT, (data, tag) -> {
|
||||||
final Tag lootTable = data.get("loot_table");
|
final Tag lootTable = data.get("loot_table");
|
||||||
if (lootTable != null) {
|
if (lootTable != null) {
|
||||||
tag.put("LootTable", lootTable);
|
getBlockEntityTag(tag).put("LootTable", lootTable);
|
||||||
}
|
}
|
||||||
final Tag lootTableSeed = data.get("loot_table_seed");
|
final Tag lootTableSeed = data.get("loot_table_seed");
|
||||||
if (lootTableSeed != null) {
|
if (lootTableSeed != null) {
|
||||||
tag.put("LootTableSeed", lootTableSeed);
|
getBlockEntityTag(tag).put("LootTableSeed", lootTableSeed);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
register(StructuredDataKey.ENCHANTMENT_GLINT_OVERRIDE, (data, tag) -> {
|
register(StructuredDataKey.ENCHANTMENT_GLINT_OVERRIDE, (data, tag) -> {
|
||||||
@ -493,7 +493,7 @@ public final class StructuredDataConverter {
|
|||||||
}
|
}
|
||||||
getBlockEntityTag(tag, "banner").put("Patterns", patternsTag);
|
getBlockEntityTag(tag, "banner").put("Patterns", patternsTag);
|
||||||
});
|
});
|
||||||
register(StructuredDataKey.CONTAINER, (connection, data, tag) -> convertItemList(connection, data, tag, "Items"));
|
register(StructuredDataKey.CONTAINER, (connection, data, tag) -> convertItemList(connection, data, getBlockEntityTag(tag), "Items"));
|
||||||
register(StructuredDataKey.CAN_PLACE_ON, (data, tag) -> convertBlockPredicates(tag, data, "CanPlaceOn", HIDE_CAN_PLACE_ON));
|
register(StructuredDataKey.CAN_PLACE_ON, (data, tag) -> convertBlockPredicates(tag, data, "CanPlaceOn", HIDE_CAN_PLACE_ON));
|
||||||
register(StructuredDataKey.CAN_BREAK, (data, tag) -> convertBlockPredicates(tag, data, "CanDestroy", HIDE_CAN_DESTROY));
|
register(StructuredDataKey.CAN_BREAK, (data, tag) -> convertBlockPredicates(tag, data, "CanDestroy", HIDE_CAN_DESTROY));
|
||||||
register(StructuredDataKey.MAP_POST_PROCESSING, (data, tag) -> {
|
register(StructuredDataKey.MAP_POST_PROCESSING, (data, tag) -> {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren