Package kr.toxicity.model.api.platform
Interface PlatformLocation
- All Superinterfaces:
PlatformRegionHolder
Represents a location in the underlying platform.
This interface provides access to coordinates, rotation, and the world, as well as methods for manipulating the location.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull PlatformLocationadd(double x, double y, double z) Creates a new location by adding the specified coordinates to this location.default doubledistance(@NotNull PlatformLocation other) Calculates the distance between this location and another location.default doubledistanceSquared(@NotNull PlatformLocation other) Calculates the squared distance between this location and another location.floatpitch()Returns the pitch (vertical rotation).world()Returns the world associated with this location.doublex()Returns the X coordinate.doubley()Returns the Y coordinate.floatyaw()Returns the yaw (horizontal rotation).doublez()Returns the Z coordinate.Methods inherited from interface kr.toxicity.model.api.platform.PlatformRegionHolder
task, taskLater
-
Method Details
-
world
PlatformWorld world()Returns the world associated with this location.- Returns:
- the world
- Since:
- 2.0.0
-
x
double x()Returns the X coordinate.- Returns:
- the X coordinate
- Since:
- 2.0.0
-
y
double y()Returns the Y coordinate.- Returns:
- the Y coordinate
- Since:
- 2.0.0
-
z
double z()Returns the Z coordinate.- Returns:
- the Z coordinate
- Since:
- 2.0.0
-
pitch
float pitch()Returns the pitch (vertical rotation).- Returns:
- the pitch
- Since:
- 2.0.0
-
yaw
float yaw()Returns the yaw (horizontal rotation).- Returns:
- the yaw
- Since:
- 2.0.0
-
add
Creates a new location by adding the specified coordinates to this location.- Parameters:
x- the X offsety- the Y offsetz- the Z offset- Returns:
- the new location
- Since:
- 2.0.0
-
distance
Calculates the distance between this location and another location.- Parameters:
other- the other location- Returns:
- the distance
- Since:
- 2.1.0
-
distanceSquared
Calculates the squared distance between this location and another location.- Parameters:
other- the other location- Returns:
- the squared distance
- Since:
- 2.1.0
-