Interface ILocation

All Known Implementing Classes:
LocationSpigot

public interface ILocation
Represents a position in a world.
  • Method Details

    • setX

      @CheckReturnValue @Contract(pure=true) ILocation setX(double newVal)
      Changes the x coordinate.
      Parameters:
      newVal - The new coordinate.
      Returns:
      A new ILocation.
    • setY

      @CheckReturnValue @Contract(pure=true) ILocation setY(double newVal)
      Changes the y coordinate.
      Parameters:
      newVal - The new coordinate.
      Returns:
      A new ILocation.
    • setZ

      @CheckReturnValue @Contract(pure=true) ILocation setZ(double newVal)
      Changes the z coordinate.@CheckReturnValue
      Parameters:
      newVal - The new coordinate.
      Returns:
      A new ILocation.
    • add

      @CheckReturnValue @Contract(pure=true) ILocation add(double x, double y, double z)
      Adds values to the coordinates of this location.
      Parameters:
      x - The value to add to the x coordinate.
      y - The value to add to the y coordinate.
      z - The value to add to the z coordinate.
      Returns:
      A new ILocation.
    • add

      @CheckReturnValue @Contract(pure=true) ILocation add(Vector3Di vector)
      Adds values to the coordinates of this location.
      Parameters:
      vector - The vector to add to the coordinates.
      Returns:
      A new ILocation.
    • add

      @CheckReturnValue @Contract(pure=true) ILocation add(Vector3Dd vector)
      Adds values to the coordinates of this location.
      Parameters:
      vector - The vector to add to the coordinates.
      Returns:
      A new ILocation.
    • getWorld

      @CheckReturnValue @Contract(pure=true) IWorld getWorld()
      Gets the world of this location.
      Returns:
      The world of this location.
    • getChunk

      @CheckReturnValue @Contract(pure=true) Vector2Di getChunk()
      Gets the chunk coordinates of the chunk this location is in.
      Returns:
      The chunk coordinates of this location.
    • getBlockX

      @CheckReturnValue @Contract(pure=true) int getBlockX()
      Gets the X value of this location.
      Returns:
      The X value of this location.
    • getBlockY

      @CheckReturnValue @Contract(pure=true) int getBlockY()
      Gets the Y value of this location.
      Returns:
      The Y value of this location.
    • getBlockZ

      @CheckReturnValue @Contract(pure=true) int getBlockZ()
      Gets the Z value of this location.
      Returns:
      The Z value of this location.
    • getX

      @CheckReturnValue @Contract(pure=true) double getX()
      Gets the X value of this location.
      Returns:
      The X value of this location.
    • getY

      @CheckReturnValue @Contract(pure=true) double getY()
      Gets the Y value of this location.
      Returns:
      The Y value of this location.
    • getZ

      @CheckReturnValue @Contract(pure=true) double getZ()
      Gets the Z value of this location.
      Returns:
      The Z value of this location.
    • getPosition

      @CheckReturnValue @Contract(pure=true) default Vector3Di getPosition()
    • getPositionDouble

      @CheckReturnValue @Contract(pure=true) default Vector3Dd getPositionDouble()
    • toIntPositionString

      @CheckReturnValue @Contract(pure=true) default String toIntPositionString()
      Gets the position (so no world) in integers as a String.
      Returns:
      The position in integers as a String.
    • toDoublePositionString

      @CheckReturnValue @Contract(pure=true) default String toDoublePositionString()
      Gets the position (so no world) in double as a String.
      Returns:
      The position in double as a String.