blockgame/mods/bg_grass/death.lua

11 lines
271 B
Lua
Raw Normal View History

blockgame.register_abm({
nodenames = {"core:grass"},
interval = 15,
chance = 4,
action = function (pos, node)
if blockgame.air_flows_through(pos + blockgame.vector.dirs.up) then return false end
minetest.set_node(pos, {name = "core:dirt"})
return true
end,
})