From 9dd6350f7d46e7acf235e0c4f4ffd1e262f87769 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 14 May 2017 22:58:37 +0200 Subject: [PATCH] Add back the grass path ABM again --- mods/ITEMS/mcl_core/functions.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 29b70e096b..380b249a85 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -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 --- --------------------------