Implemented suggestion from '#2 spawn_block function should ignore snow'

master
Tai Kedzierski 2019-03-06 11:47:14 +00:00
parent 22e0d77817
commit 4a643afeba
1 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,11 @@ function rspawn:newspawn(pos, radius)
and not minetest.is_protected(anode, "")
and not (under.groups and under.groups.leaves ) -- no spawning on treetops!
and daylight_above(7, anode) then
validnodes[#validnodes+1] = anode
if under.buildable_to then
validnodes[#validnodes+1] = {x=anode.x, y=anode.y-1, z=anode.z}
else
validnodes[#validnodes+1] = anode
end
end
end