it wouldnt be a patch from me if it forgot to have its debug statements removed

This commit is contained in:
Jordach 2017-12-11 19:15:54 +00:00
parent 0ef0eed18e
commit c8879ddeed

View File

@ -175,15 +175,10 @@ function mcore.sensible_facedir(itemstack, placer, pointed_thing)
local pz = math.abs(placer:get_pos().z - rpos.z)
print (px, pz)
if px < 2 and pz < 2 then -- if the node is being placed 1 block away from us, then lets place it either upright or upside down
local pY = math.abs(placer:get_pos().y + 1.14) -- we measure the y distance by itself as it may not be needed for wall placed blocks.
print(pY - math.abs(rpos.y))
print(math.abs(rpos.y) - pY)
if pY - math.abs(rpos.y) > 1.5 then -- are we being placed on the floor? let's be upright then.
if deg_to_fdir == 0 then fdir = 0 -- north