ModLocation

Represents a Mod location wrapped as a PlatformLocation.

Since

2.0.0

Parameters

level

the NMS level

x

the x coordinate

y

the y coordinate

z

the z coordinate

pitch

the pitch

yaw

the yaw

Constructors

Link copied to clipboard
@ApiStatus.Internal
constructor(@Nullable level: @Nullable Level, x: Double, y: Double, z: Double, pitch: Float, yaw: Float)

Functions

Link copied to clipboard
@NotNull
open fun add(x: Double, y: Double, z: Double): @NotNull PlatformLocation
Link copied to clipboard
open fun distance(other: @NotNull PlatformLocation): Double
Link copied to clipboard
open fun distanceSquared(other: @NotNull PlatformLocation): Double
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
@NotNull
open fun of(@NotNull entity: @NotNull Entity): @NotNull ModLocation
Creates a ModLocation from an entity's position.
@NotNull
open fun of(@Nullable level: @Nullable Level, position: Vec3): @NotNull ModLocation
Creates a ModLocation from the position vector with zero pitch and yaw.
@NotNull
open fun of(@Nullable level: @Nullable Level, x: Double, y: Double, z: Double): @NotNull ModLocation
Creates a ModLocation from the coordinates with zero pitch and yaw.
@NotNull
open fun of(@Nullable level: @Nullable Level, position: Vec3, pitch: Float, yaw: Float): @NotNull ModLocation
Creates a ModLocation from the position vector.
@NotNull
open fun of(@Nullable level: @Nullable Level, x: Double, y: Double, z: Double, pitch: Float, yaw: Float): @NotNull ModLocation
Creates a ModLocation from the coordinates.
Link copied to clipboard
@NotNull
open fun ofEye(@NotNull entity: @NotNull Entity): @NotNull ModLocation
Creates a ModLocation from an entity's eye position.
Link copied to clipboard
abstract fun pitch(): Float
Link copied to clipboard
@Nullable
open fun task(@NotNull runnable: @NotNull Runnable): @Nullable ModelTask
Link copied to clipboard
@Nullable
open fun taskLater(delay: Long, @NotNull runnable: @NotNull Runnable): @Nullable ModelTask
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
@NotNull
open fun world(): @NotNull PlatformWorld
Link copied to clipboard
abstract fun x(): Double
Link copied to clipboard
abstract fun y(): Double
Link copied to clipboard
abstract fun yaw(): Float
Link copied to clipboard
abstract fun z(): Double