mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 13:11:41 -04:00
Add support for walkable plants
This commit is contained in:
parent
9bbde070a1
commit
02bfcae53d
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue