From f4c26fb5781550c361b13117ed206ea61826de8d Mon Sep 17 00:00:00 2001 From: anarquimico Date: Wed, 1 Mar 2023 08:28:56 -0300 Subject: [PATCH 1/3] Change the mangrove roots to a water logged roots after using a bucket with water on it --- mods/ITEMS/mcl_buckets/init.lua | 2 +- mods/ITEMS/mcl_buckets/register.lua | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index e08238448..ecc867482 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -171,7 +171,7 @@ local function on_place_bucket(itemstack, user, pointed_thing) local node = get_node(pos) local node_def = registered_nodes[node.name] - if node_def and node_def.buildable_to or get_item_group(node.name, "cauldron") == 1 then + if node_def and node_def.buildable_to or get_item_group(node.name, "cauldron") == 1 or minetest.get_node(pos).name == "mcl_mangrove:mangrove_roots" then local result, take_bucket = get_extra_check(bucket_def.extra_check, pos, user) if result then local node_place = get_node_place(bucket_def.source_place, pos) diff --git a/mods/ITEMS/mcl_buckets/register.lua b/mods/ITEMS/mcl_buckets/register.lua index 365966724..c8bf4016f 100644 --- a/mods/ITEMS/mcl_buckets/register.lua +++ b/mods/ITEMS/mcl_buckets/register.lua @@ -65,6 +65,11 @@ if mod_mcl_core then end sound_place("mcl_core:water_source", pos) return false, true + -- Put water into mangrove roots + elseif minetest.get_node(pos).name == "mcl_mangrove:mangrove_roots" then + minetest.set_node(pos, {name="mcl_mangrove:water_logged_roots"}) + sound_place("mcl_core:water_source", pos) + return false, true -- Evaporate water if used in Nether (except on cauldron) else local dim = mcl_worlds.pos_to_dimension(pos) From 0aa3c52263684a47a0579a01b644d670a4e4db2b Mon Sep 17 00:00:00 2001 From: anarquimico Date: Wed, 1 Mar 2023 20:52:02 -0300 Subject: [PATCH 2/3] Make it work with river water --- mods/ITEMS/mcl_buckets/register.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/ITEMS/mcl_buckets/register.lua b/mods/ITEMS/mcl_buckets/register.lua index c8bf4016f..676865ba6 100644 --- a/mods/ITEMS/mcl_buckets/register.lua +++ b/mods/ITEMS/mcl_buckets/register.lua @@ -104,6 +104,11 @@ if mod_mclx_core then end sound_place("mcl_core:water_source", pos) return false, true + -- Put water into mangrove roots + elseif minetest.get_node(pos).name == "mcl_mangrove:mangrove_roots" then + minetest.set_node(pos, {name="mcl_mangrove:water_logged_roots"}) + sound_place("mcl_core:water_source", pos) + return false, true else -- Evaporate water if used in Nether (except on cauldron) local dim = mcl_worlds.pos_to_dimension(pos) From 6bdc0f032f5ef12a210becc93ca623cdcbef724b Mon Sep 17 00:00:00 2001 From: anarquimico Date: Wed, 1 Mar 2023 21:10:57 -0300 Subject: [PATCH 3/3] Fixed for river_water_logged_roots --- mods/ITEMS/mcl_buckets/register.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_buckets/register.lua b/mods/ITEMS/mcl_buckets/register.lua index 676865ba6..d9054d498 100644 --- a/mods/ITEMS/mcl_buckets/register.lua +++ b/mods/ITEMS/mcl_buckets/register.lua @@ -104,9 +104,9 @@ if mod_mclx_core then end sound_place("mcl_core:water_source", pos) return false, true - -- Put water into mangrove roots + -- Put river water into mangrove roots elseif minetest.get_node(pos).name == "mcl_mangrove:mangrove_roots" then - minetest.set_node(pos, {name="mcl_mangrove:water_logged_roots"}) + minetest.set_node(pos, {name="mcl_mangrove:river_water_logged_roots"}) sound_place("mcl_core:water_source", pos) return false, true else