PlatformLocation

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

Functions

Link copied to clipboard
@NotNull
abstract fun add(x: Double, y: Double, z: Double): @NotNull PlatformLocation
Creates a new location by adding the specified coordinates to this location.
Link copied to clipboard
open fun distance(@NotNull other: @NotNull PlatformLocation): Double
Calculates the distance between this location and another location.
Link copied to clipboard
open fun distanceSquared(@NotNull other: @NotNull PlatformLocation): Double
Calculates the squared distance between this location and another location.
Link copied to clipboard
abstract fun pitch(): Float
Returns the pitch (vertical rotation).
Link copied to clipboard
@Nullable
abstract fun task(@NotNull runnable: @NotNull Runnable): @Nullable ModelTask
Schedules a task to run on the next tick, synchronized with this region holder.
Link copied to clipboard
@Nullable
abstract fun taskLater(delay: Long, @NotNull runnable: @NotNull Runnable): @Nullable ModelTask
Schedules a task to run after a delay, synchronized with this region holder.
Link copied to clipboard
abstract fun world(): PlatformWorld
Returns the world associated with this location.
Link copied to clipboard
abstract fun x(): Double
Returns the X coordinate.
Link copied to clipboard
abstract fun y(): Double
Returns the Y coordinate.
Link copied to clipboard
abstract fun yaw(): Float
Returns the yaw (horizontal rotation).
Link copied to clipboard
abstract fun z(): Double
Returns the Z coordinate.