Thanks for your reply. Unfortunately, the controller still can't determine the blocks correctly.
See this picture - the small arrows on the controller point to the direction they're facing to:
currentPos = currentPos.add(0, -1, 0);
currentPos = currentPos.offset(EnumFacing.byIndex(world.getBlockState(currentPos).getBlock().getMetaFromState(world.getBlockState(currentPos))).rotateYCCW());
^ that's the code I currently have. currentPos is the controller's position at first, then I subtract 1 on the y axis and rotate the facing counter-clockwise. I placed the stone block where currentPos is. As you can see, the block isn't always at the same position relative to the controller.
I have trouble with fixing this, any help will be appreciated!