Interface FinePosition

All Superinterfaces:
Position
All Known Implementing Classes:
Location

@Experimental @NullMarked public interface FinePosition extends Position
A position represented with doubles.

May see breaking changes until Experimental annotation is removed.

See Also:
  • Field Summary

    Fields inherited from interface io.papermc.paper.math.Position

    BLOCK_ZERO, FINE_ZERO
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Gets the block x value for this position
    default int
    Gets the block x value for this position
    default int
    Gets the block x value for this position
    default boolean
    Checks of this position represents a BlockPosition
    default boolean
    Checks if this position represents a FinePosition
    default FinePosition
    offset(double x, double y, double z)
    Returns a position offset by the specified amounts.
    default FinePosition
    offset(int x, int y, int z)
    Returns a position offset by the specified amounts.
    Returns the block position of this position or itself if it already is a block position

    Methods inherited from interface io.papermc.paper.math.Position

    isFinite, toCenter, toLocation, toVector, x, y, z
  • Method Details

    • blockX

      default int blockX()
      Description copied from interface: Position
      Gets the block x value for this position
      Specified by:
      blockX in interface Position
      Returns:
      the block x value
    • blockY

      default int blockY()
      Description copied from interface: Position
      Gets the block x value for this position
      Specified by:
      blockY in interface Position
      Returns:
      the block x value
    • blockZ

      default int blockZ()
      Description copied from interface: Position
      Gets the block x value for this position
      Specified by:
      blockZ in interface Position
      Returns:
      the block x value
    • isBlock

      default boolean isBlock()
      Description copied from interface: Position
      Checks of this position represents a BlockPosition
      Specified by:
      isBlock in interface Position
      Returns:
      true if block
    • isFine

      default boolean isFine()
      Description copied from interface: Position
      Checks if this position represents a FinePosition
      Specified by:
      isFine in interface Position
      Returns:
      true if fine
    • toBlock

      default BlockPosition toBlock()
      Description copied from interface: Position
      Returns the block position of this position or itself if it already is a block position
      Specified by:
      toBlock in interface Position
      Returns:
      the block position
    • offset

      default FinePosition offset(int x, int y, int z)
      Description copied from interface: Position
      Returns a position offset by the specified amounts.
      Specified by:
      offset in interface Position
      Parameters:
      x - x value to offset
      y - y value to offset
      z - z value to offset
      Returns:
      the offset position
    • offset

      default FinePosition offset(double x, double y, double z)
      Description copied from interface: Position
      Returns a position offset by the specified amounts.
      Specified by:
      offset in interface Position
      Parameters:
      x - x value to offset
      y - y value to offset
      z - z value to offset
      Returns:
      the offset position