blockgame/mods/bg_terrain/grass_death.lua
2023-10-16 21:40:29 +02:00

10 lines
283 B
Lua

blockgame.register_abm({
nodenames = {"bg_terrain: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 = "bg_terrain:dirt"})
return true
end,
})