of

@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.

Return

the instance

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


@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.

Return

the instance

Since

2.0.0

Parameters

level

the NMS level

x

the x coordinate

y

the y coordinate

z

the z coordinate


@NotNull
open fun of(@Nullable level: @Nullable Level, position: Vec3, pitch: Float, yaw: Float): @NotNull ModLocation

Creates a ModLocation from the position vector.

Return

the instance

Since

2.0.0

Parameters

level

the NMS level

position

the position vector

pitch

the pitch

yaw

the yaw


@NotNull
open fun of(@Nullable level: @Nullable Level, position: Vec3): @NotNull ModLocation

Creates a ModLocation from the position vector with zero pitch and yaw.

Return

the instance

Since

2.0.0

Parameters

level

the NMS level

position

the position vector


@NotNull
open fun of(@NotNull entity: @NotNull Entity): @NotNull ModLocation

Creates a ModLocation from an entity's position.

Return

the location

Since

2.0.0

Parameters

entity

the entity