forked from VoxeLibre/VoxeLibre
Create drips only below solids below liquids
This commit is contained in:
parent
0ae946a920
commit
d13fe532c5
|
@ -91,10 +91,11 @@ minetest.register_abm(
|
||||||
interval = 2,
|
interval = 2,
|
||||||
chance = 22,
|
chance = 22,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
if minetest.get_node({x=pos.x, y=pos.y -1, z=pos.z}).name == "air" and
|
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name, "water") ~= 0 and
|
||||||
minetest.get_node({x=pos.x, y=pos.y -2, z=pos.z}).name == "air" then
|
minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" and
|
||||||
local i = math.random(-45,45) / 100
|
minetest.get_node({x=pos.x, y=pos.y-2, z=pos.z}).name == "air" then
|
||||||
minetest.add_entity({x=pos.x + i, y=pos.y - 0.501, z=pos.z + i}, "drippingwater:drop_water")
|
local i = math.random(-45,45) / 100
|
||||||
|
minetest.add_entity({x=pos.x + i, y=pos.y - 0.501, z=pos.z + i}, "drippingwater:drop_water")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -109,10 +110,11 @@ minetest.register_abm(
|
||||||
interval = 2,
|
interval = 2,
|
||||||
chance = 22,
|
chance = 22,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
if minetest.get_node({x=pos.x, y=pos.y -1, z=pos.z}).name == "air" and
|
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name, "lava") ~= 0 and
|
||||||
minetest.get_node({x=pos.x, y=pos.y -2, z=pos.z}).name == "air" then
|
minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" and
|
||||||
local i = math.random(-45,45) / 100
|
minetest.get_node({x=pos.x, y=pos.y-2, z=pos.z}).name == "air" then
|
||||||
minetest.add_entity({x=pos.x + i, y=pos.y - 0.501, z=pos.z + i}, "drippingwater:drop_lava")
|
local i = math.random(-45,45) / 100
|
||||||
|
minetest.add_entity({x=pos.x + i, y=pos.y - 0.501, z=pos.z + i}, "drippingwater:drop_lava")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue