Class ClickedBlockDisplay

java.lang.Object
me.c7dev.dexterity.util.ClickedBlockDisplay

public class ClickedBlockDisplay extends Object
  • Constructor Details

  • Method Details

    • setRollOffset

      public void setRollOffset(RollOffset ro)
    • getBlockDisplay

      public BlockDisplay getBlockDisplay()
    • getBlockFace

      public BlockFace getBlockFace()
    • getOffsetFromFaceCenter

      public Vector getOffsetFromFaceCenter()
      Retrieves the vector along the plane of the block face from the center of the face to the precise location of the click
      Returns:
      Unmodifiable vector
    • getClickLocation

      public Location getClickLocation()
      Retrieves the precise location on the block face that the player clicked
      Returns:
      Unmodifiable location
    • getDisplayCenterLocation

      public Location getDisplayCenterLocation()
      Retrieves the center of the block display entity
      Returns:
      Unmodifiable location
    • getNormal

      public Vector getNormal()
      Retrieves a unit vector that is perpendicular to the clicked block face
      Returns:
      Unmodifiable unit vector
    • getUpDir

      public Vector getUpDir()
      Retrieves the entity's relative up direction basis vector
      Returns:
      Unmodifiable unit vector
    • getEastDir

      public Vector getEastDir()
      Retrieves the entity's relative east direction basis vector
      Returns:
      Unmodifiable unit vector
    • getSouthDir

      public Vector getSouthDir()
      Retrieves the entity's relative south direction basis vector
      Returns:
      Unmodifiable unit vector
    • getDistance

      public double getDistance()
      Retrieves the distance from the player's eye location to the block face in units of blocks
      Returns:
    • getRollOffset

      public RollOffset getRollOffset()
      Retrieves a wrapper for the calculated roll offset, if roll is used in the block display's rotation
      Returns: