- Code: Select all
minetest.register_abm(
{nodenames = {"default:dirt"},
interval = 5,
chance = 10,
action = function(pos)
local airpos = minetest.find_node_near({x.pos, y.pos=y.pos+1, z.pos}, 1, {"default:air"})
if airpos==true then
minetest.env:add_node(airpos, {name="default:sand"})
end,
})