mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-25 04:13:44 +01:00
Slowly turn grass path below solid node to dirt
This commit is contained in:
parent
5dbf2beb6a
commit
d20de89780
@ -445,6 +445,21 @@ minetest.register_abm({
|
|||||||
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 ---
|
-- Try generate tree ---
|
||||||
|
Loading…
Reference in New Issue
Block a user