fix grass spread below soil

This commit is contained in:
cora 2022-04-30 22:56:08 +02:00
parent e9182a9506
commit e29e7439cd
1 changed files with 2 additions and 2 deletions

View File

@ -772,9 +772,9 @@ minetest.register_abm({
return
end
local can_change = false
local above = {x=pos.x, y=pos.y+1, z=pos.z}
local above = vector.offset(pos,0,1,0)
local abovenode = minetest.get_node(above)
if minetest.get_item_group(abovenode.name, "liquid") ~= 0 or minetest.get_item_group(abovenode.name, "opaque") == 1 then
if minetest.get_item_group(abovenode.name, "liquid") ~= 0 or minetest.get_item_group(abovenode.name, "opaque") == 1 or minetest.get_item_group(abovenode.name, "soil") ~= 0 then
-- Never grow directly below liquids or opaque blocks
return
end