From c34099b92edb3cbed4fa979f0a282fe49216bdf4 Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Sat, 4 Sep 2021 03:38:59 +0200 Subject: [PATCH] spede up water flow into air (WIP) --- mods/ITEMS/mcl_core/nodes_liquid.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mods/ITEMS/mcl_core/nodes_liquid.lua b/mods/ITEMS/mcl_core/nodes_liquid.lua index 380f12e3..aa87ac57 100644 --- a/mods/ITEMS/mcl_core/nodes_liquid.lua +++ b/mods/ITEMS/mcl_core/nodes_liquid.lua @@ -122,6 +122,20 @@ function cool_lava_next_to_water_flow(pos) minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true) end +function flow_water_into_air(pos) + local node = minetest.get_node(pos) + if node.name ~= "air" then + return + end + minetest.set_node( + pos, + { + name="mcl_core:water_flowing", + param2 = 15, + } + ) +end + function flow_water_downwards(pos, node, limit) if limit == 0 then return @@ -189,6 +203,7 @@ minetest.register_abm({ } for _, neighbour_pos in ipairs(neighbours_pos) do cool_lava_next_to_water_flow(neighbour_pos) + flow_water_into_air(neighbour_pos) end end -- local below_pos = {x=pos.x, y=pos.y-1, z=pos.z}