From 4e770c5360aeceb34ced00f687a53bf0a3bc64ca Mon Sep 17 00:00:00 2001 From: Sakura Ryoko Date: Tue, 25 Jun 2024 18:27:54 -0400 Subject: [PATCH] Fix "id" missing from TE in older litematic files (1.19.x or below) --- .../conversion/SchematicConversionMaps.java | 55 ++++++++++++++++++- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/src/main/java/fi/dy/masa/litematica/schematic/conversion/SchematicConversionMaps.java b/src/main/java/fi/dy/masa/litematica/schematic/conversion/SchematicConversionMaps.java index 0613fc90ef..cf8d2dabad 100644 --- a/src/main/java/fi/dy/masa/litematica/schematic/conversion/SchematicConversionMaps.java +++ b/src/main/java/fi/dy/masa/litematica/schematic/conversion/SchematicConversionMaps.java @@ -383,7 +383,7 @@ else if (tags.contains("RecordItem")) { tags.putString("id", "minecraft:jukebox"); } - else if (tags.contains("Book")) + else if (tags.contains("Book") || tags.contains("book")) { tags.putString("id", "minecraft:lectern"); } @@ -391,14 +391,63 @@ else if (tags.contains("front_text")) { tags.putString("id", "minecraft:sign"); } - else if (tags.contains("OutputSignal")) + else if (tags.contains("BrewTime") || tags.contains("Fuel")) { - tags.putString("id", "minecraft:comparator"); + tags.putString("id", "minecraft:brewing_stand"); + } + else if ((tags.contains("LootTable") && tags.contains("LootTableSeed")) || (tags.contains("hit_direction") || tags.contains("item"))) + { + tags.putString("id", "minecraft:suspicious_sand"); + } + else if (tags.contains("SpawnData") || tags.contains("SpawnPotentials")) + { + tags.putString("id", "minecraft:spawner"); + } + else if (tags.contains("normal_config")) + { + tags.putString("id", "minecraft:trial_spawner"); + } + else if (tags.contains("shared_data")) + { + tags.putString("id", "minecraft:vault"); + } + else if (tags.contains("pool") && tags.contains("final_state") && tags.contains("placement_priority")) + { + tags.putString("id", "minecraft:jigsaw"); + } + else if (tags.contains("author") && tags.contains("metadata") && tags.contains("showboundingbox")) + { + tags.putString("id", "minecraft:structure_block"); + } + else if (tags.contains("ExactTeleport") && tags.contains("Age")) + { + tags.putString("id", "minecraft:end_gateway"); } else if (tags.contains("Items")) { tags.putString("id", "minecraft:chest"); } + else if (tags.contains("last_vibration_frequency") || tags.contains("listener")) + { + tags.putString("id", "minecraft:sculk_sensor"); + } + else if (tags.contains("warning_level") || tags.contains("listener")) + { + tags.putString("id", "minecraft:sculk_shrieker"); + } + else if (tags.contains("OutputSignal")) + { + tags.putString("id", "minecraft:comparator"); + } + else if (tags.contains("facing") || tags.contains("extending")) + { + tags.putString("id", "minecraft:piston"); + } + else if (tags.contains("x") && tags.contains("y") && tags.contains("z")) + { + // Might only have x y z pos + tags.putString("id", "minecraft:piston"); + } return tags; }