mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Add back the grass path ABM again
This commit is contained in:
parent
4d5f1d9d47
commit
9dd6350f7d
1 changed files with 16 additions and 0 deletions
|
@ -456,6 +456,22 @@ minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack
|
|||
end
|
||||
end)
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Turn Grass Path below solid block into Dirt",
|
||||
nodenames = {"mcl_core:grass_path"},
|
||||
neighbors = {"group:solid"},
|
||||
interval = 8,
|
||||
chance = 50,
|
||||
action = function(pos, node)
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
if name ~= "ignore" and nodedef and (nodedef.groups and nodedef.groups.solid) then
|
||||
minetest.set_node(pos, {name = "mcl_core:dirt"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
--------------------------
|
||||
-- Try generate tree ---
|
||||
--------------------------
|
||||
|
|
Loading…
Reference in a new issue