From 96822be63d3b8b6a4f8346a5cc164ed9adcb3d7e Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Sun, 6 Feb 2022 01:19:23 +0100 Subject: [PATCH] Add (theoretically) fireproof test structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds a new test structure to the “/spawnstruct” command which can be spawned with this command: /spawnstruct test_structure_fireproof The structure can be used to verify that eternal fire can be spawned by the structure placement code. It can also be used to debug fire spread, as according to Minecraft fire spread rules, it should be fireproof. See for those rules. --- mods/MAPGEN/mcl_structures/init.lua | 9 ++++++++- .../mcl_structures_test_structure_fireproof.mts | Bin 0 -> 245 bytes 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_test_structure_fireproof.mts diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 2423e704..0383c48a 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -532,9 +532,14 @@ local function dir_to_rotation(dir) return "0" end +mcl_structures.generate_test_structure_fireproof = function(pos, rotation, pr) + local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_test_structure_fireproof.mts" + mcl_structures.place_schematic(pos, path, rotation, nil, true, nil, nil, pr) +end + -- Debug command minetest.register_chatcommand("spawnstruct", { - params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_portal_shrine", + params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_portal_shrine | test_structure_fireproof", description = S("Generate a pre-defined structure near your position."), privs = {debug = true}, func = function(name, param) @@ -568,6 +573,8 @@ minetest.register_chatcommand("spawnstruct", { mcl_structures.generate_end_exit_portal(pos, rot, pr) elseif param == "end_portal_shrine" then mcl_structures.generate_end_portal_shrine(pos, rot, pr) + elseif param == "test_structure_fireproof" then + mcl_structures.generate_test_structure_fireproof(pos, rot, pr) elseif param == "" then message = S("Error: No structure type given. Please use “/spawnstruct ”.") errord = true diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_test_structure_fireproof.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_test_structure_fireproof.mts new file mode 100644 index 0000000000000000000000000000000000000000..287bfe52e5241cbcce59f9dc242028e61d80d4de GIT binary patch literal 245 zcmeYb3HD`RVPI$AVqmX_0|r(G=ETe*2Kn6NocQGYqExHmlA_Flg4C4wl*FR!`257| z_#_~MK?YMnQf5(d21HgAB%7C7l95_u1)+)(ld~DX!fBa6Q&US)i}Dh4;z68>ImrnM z3=)zv8YI|e9H{Yn+QEKe*@8<3muF~9I{e-!W}ES%m5vN*o1Sv)