actually calculate direction correctly
kinda subtle bug for when blockpan wraps
blockpan orientation confusion