blockgame/mods/bg_grass/death.lua
trans_soup 7b86727e4b create grass mod.
create a new mod that implements basic grass growth and death.
2023-10-12 08:26:37 +02:00

10 lines
271 B
Lua

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,
})