Significantly incrase item settling distance.

This commit is contained in:
Aaron Suen 2019-01-24 23:34:08 -05:00
parent b6a83b2791
commit 375ed437d0

View File

@ -90,11 +90,11 @@ local item = {
bii.on_step(self, dtime)
if self.physical_state then return end
local pos = vector.round(self.object:getpos())
pos = nodecore.buildable_to(pos)
or nodecore.buildable_to({x = pos.x + 1, y = pos.y, z = pos.z})
or nodecore.buildable_to({x = pos.x - 1, y = pos.y, z = pos.z})
or nodecore.buildable_to({x = pos.x, y = pos.y, z = pos.z + 1})
or nodecore.buildable_to({x = pos.x, y = pos.y, z = pos.z - 1})
pos = nodecore.scan_flood(pos, 5,
function(p)
return p.y <= pos.y and nodecore.buildable_to(p)
and p or nil
end)
if not pos then return end
nodecore.place_stack(pos, self.itemstring)
self.itemstring = ""