I found a method to calculate distance from which you should stair upto flag, burner has a method, but it works only on openspades, I use butterspades so I took some time to think and made one, it works for platforms at different heights (tested and verified):
-
Make a 2 block tall tower.
-
Crouch down and go forward into those blocks so you touching them. Then alight the crosshair with top of block.
-
Now move yourself in a position where the top of end front voxel of grey part is aligning with bottom of flag block.
-
Then now the block ur standing on is the block you should stair up from.




