mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 22:33:16 -04:00
Fix liquid not flowing in moontest air
Also minor tweak to cause it not to delete vacuum or air directly above it... doesn't flow upwards anyway, now does it?
This commit is contained in:
parent
228ff22996
commit
170596c13f
1 changed files with 4 additions and 4 deletions
|
@ -129,19 +129,19 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
vm:write_to_map(data)
|
||||
end)
|
||||
|
||||
--make liquid delete vacuum nodes nearby so as to allow flowing
|
||||
--make liquid delete vacuum and air nodes nearby so as to allow flowing
|
||||
minetest.register_abm({
|
||||
nodenames = {"group:liquid"},
|
||||
neighbors = {"moontest:vacuum"},
|
||||
neighbors = {"moontest:vacuum", "moontest:air"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
for x = -1,1 do
|
||||
for y = -1,1 do
|
||||
for y = -1,0 do
|
||||
for z = -1,1 do
|
||||
n_pos = {x=x + pos.x,y=y+pos.y,z=z+pos.z}
|
||||
n_name = minetest.get_node(n_pos).name
|
||||
if n_name == "moontest:vacuum" then
|
||||
if n_name == "moontest:vacuum" or n_name == "moontest:air" then
|
||||
minetest.remove_node(n_pos)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue