Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Player block collision checking

Comments in 'Plugin Development' started by Creeperface, Apr 10, 2016.

  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    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?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    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.

Share This Page

Advertisement