Skip to content

Commit

Permalink
Fix "id" missing from TE in older litematic files (1.19.x or below)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakura-ryoko committed Jun 25, 2024
1 parent 868f634 commit 4e770c5
Showing 1 changed file with 52 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,22 +383,71 @@ 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");
}
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;
}
Expand Down

0 comments on commit 4e770c5

Please sign in to comment.