spede up water flow into air (WIP)

This commit is contained in:
Nils Dagsson Moskopp 2021-09-04 03:38:59 +02:00
parent bed865dc79
commit c34099b92e
No known key found for this signature in database
GPG Key ID: A3BC671C35191080
1 changed files with 15 additions and 0 deletions

View File

@ -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}