From 787ef17925b03de1e0898e9ab96b89c77450a475 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Tue, 20 Feb 2024 10:42:36 -0300 Subject: [PATCH] Fix door param2 change when scrapping or waxing --- mods/ITEMS/mcl_honey/init.lua | 4 ++-- mods/ITEMS/mcl_tools/init.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_honey/init.lua b/mods/ITEMS/mcl_honey/init.lua index b080583d0..38ef3254f 100644 --- a/mods/ITEMS/mcl_honey/init.lua +++ b/mods/ITEMS/mcl_honey/init.lua @@ -20,10 +20,10 @@ function mcl_honey.wax_block(pos, node, player, itemstack, pointed_thing) if def.groups.door == 1 then if node.name:find("_b_") then local top_pos = { x = pos.x, y = pos.y + 1, z = pos.z } - minetest.swap_node(top_pos, { name = def._mcl_waxed_variant:gsub("_b_", "_t_") }) + minetest.swap_node(top_pos, { name = def._mcl_waxed_variant:gsub("_b_", "_t_"), param2 = node.param2 }) elseif node.name:find("_t_") then local bot_pos = { x = pos.x, y = pos.y - 1, z = pos.z } - minetest.swap_node(bot_pos, { name = def._mcl_waxed_variant:gsub("_t_", "_b_") }) + minetest.swap_node(bot_pos, { name = def._mcl_waxed_variant:gsub("_t_", "_b_"), param2 = node.param2 }) end end else diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index 36dc3e3f8..a4f5c45ca 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -414,10 +414,10 @@ local function make_stripped_trunk(itemstack, placer, pointed_thing) local pt_under = pointed_thing.under if node_name:find("_b_") then local top_pos = {x = pt_under.x, y = pt_under.y + 1, z = pt_under.z} - minetest.swap_node(top_pos, {name=noddef._mcl_stripped_variant:gsub("_b_", "_t_")}) + minetest.swap_node(top_pos, {name=noddef._mcl_stripped_variant:gsub("_b_", "_t_"), param2=node.param2}) elseif node_name:find("_t_") then local bot_pos = {x = pt_under.x, y = pt_under.y - 1, z = pt_under.z} - minetest.swap_node(bot_pos, {name=noddef._mcl_stripped_variant:gsub("_t_", "_b_")}) + minetest.swap_node(bot_pos, {name=noddef._mcl_stripped_variant:gsub("_t_", "_b_"), param2=node.param2}) end end minetest.swap_node(pointed_thing.under, {name=noddef._mcl_stripped_variant, param2=node.param2})