Skip to content

Commit

Permalink
Add support for walkable plants
Browse files Browse the repository at this point in the history
  • Loading branch information
hdastwb authored and PilzAdam committed Jul 11, 2013
1 parent 9bbde07 commit 02bfcae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mods/farming/init.lua
Expand Up @@ -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
Expand Down

0 comments on commit 02bfcae

Please sign in to comment.