Hi i want to prevent players to bug into blocks and im using getCollisionBlocks() method. but there are some issues :/ e.g. player bounds depend on player movement speed - while sprinting on stairs, player collides with blocks behind stairs. and it is the same with slabs. but why? How should i solve it? or should i reduce bounding box?
This appears to be a technical issue that occurs due to limitations of the MCPE protocol. MCPE seems to send the position that the player is heading to [citation: Player.php line 1863, MOVE_PLAYER_PACKET packet handler]. When you are sprinting over stairs, due to the inevitable network latency, MCPE may be sending packets such that the player may walk over more than one half block per move packet. Hence, you would find that the player is like walking into the slabs. This hypothesis is supported by the old (or still existent?) issue where players get "rubberbanded" when walking/sprinting over stairs (and less noticeably, slabs too), and especially noticeable on servers with lower TPS/network speed. This was because PocketMine thought the player noclipped into the stairs/slabs. This, however, is still a hypothesis that has not been strictly proved, although apparently true both theoretically and empirically.