Interface ILocation
- All Known Implementing Classes:
LocationSpigot
public interface ILocation
Represents a position in a world.
-
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z) Adds values to the coordinates of this location.Adds values to the coordinates of this location.Adds values to the coordinates of this location.intGets the X value of this location.intGets the Y value of this location.intGets the Z value of this location.getChunk()Gets the chunk coordinates of the chunk this location is in.default Vector3Didefault Vector3DdgetWorld()Gets the world of this location.doublegetX()Gets the X value of this location.doublegetY()Gets the Y value of this location.doublegetZ()Gets the Z value of this location.setX(double newVal) Changes the x coordinate.setY(double newVal) Changes the y coordinate.setZ(double newVal) Changes the z coordinate.default StringGets the position (so no world) in double as a String.default StringGets the position (so no world) in integers as a String.
-
Method Details
-
setX
Changes the x coordinate.- Parameters:
newVal- The new coordinate.- Returns:
- A new
ILocation.
-
setY
Changes the y coordinate.- Parameters:
newVal- The new coordinate.- Returns:
- A new
ILocation.
-
setZ
Changes the z coordinate.@CheckReturnValue- Parameters:
newVal- The new coordinate.- Returns:
- A new
ILocation.
-
add
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
Adds values to the coordinates of this location.- Parameters:
vector- The vector to add to the coordinates.- Returns:
- A new
ILocation.
-
add
Adds values to the coordinates of this location.- Parameters:
vector- The vector to add to the coordinates.- Returns:
- A new
ILocation.
-
getWorld
Gets the world of this location.- Returns:
- The world of this location.
-
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
-
getPositionDouble
-
toIntPositionString
Gets the position (so no world) in integers as a String.- Returns:
- The position in integers as a String.
-
toDoublePositionString
Gets the position (so no world) in double as a String.- Returns:
- The position in double as a String.
-