From: hdastwb Date: Thu, 27 Jun 2013 18:08:51 +0000 (-0400) Subject: Add support for walkable plants X-Git-Tag: 0.4.8~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=02bfcae53db8d3b2c9bc03348db3bb6d9f7b95dc;p=oweals%2Fminetest_game.git Add support for walkable plants --- diff --git a/mods/farming/init.lua b/mods/farming/init.lua index 3c378015..9508596e 100644 --- a/mods/farming/init.lua +++ b/mods/farming/init.lua @@ -30,7 +30,10 @@ minetest.register_abm({ pos.y = pos.y+1 local nn = minetest.get_node(pos).name pos.y = pos.y-1 - if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].walkable then + if minetest.registered_nodes[nn] and + minetest.registered_nodes[nn].walkable and + minetest.get_item_group(nn, "plant") == 0 + then minetest.set_node(pos, {name="default:dirt"}) end -- check if there is water nearby