java.lang.Object
org.geysermc.connector.network.session.cache.PistonCache

public class PistonCache extends Object
  • Constructor Details

  • Method Details

    • tick

      public void tick()
    • displacePlayer

      public void displacePlayer(com.nukkitx.math.vector.Vector3d displacement)
      Add to the player's displacement and move the player's bounding box The total displacement is capped to a range of -0.51 to 0.51 per tick
      Parameters:
      displacement - The displacement to apply to the player's bounding box
    • computeCollisionOffset

      public double computeCollisionOffset(com.nukkitx.math.vector.Vector3i blockPos, BoundingBox boundingBox, Axis axis, double offset)
      Parameters:
      blockPos - The block position to test
      boundingBox - The bounding box that moves
      axis - The axis to apply the offset
      offset - The current maximum distance the bounding box can travel
      Returns:
      The new maximum distance the bounding box can travel without colliding with the tested moving block
    • checkCollision

      public boolean checkCollision(com.nukkitx.math.vector.Vector3i blockPos, BoundingBox boundingBox)
    • clear

      public void clear()