7b86727e4b
create a new mod that implements basic grass growth and death.
10 lines
271 B
Lua
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,
|
|
})
|