ModelRotation

Represents the rotation of a model in degrees.

This record stores pitch (x) and yaw (y) values and provides utility methods for conversion.

Since

1.15.2

Parameters

x

the pitch (x-rotation) in degrees

y

the yaw (y-rotation) in degrees

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
A rotation of (0, 0).
Link copied to clipboard
An invalid rotation value used for initialization or error states.

Functions

Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun packedX(): Byte
Returns the pitch packed as a byte (Minecraft protocol format).
Link copied to clipboard
open fun packedY(): Byte
Returns the yaw packed as a byte (Minecraft protocol format).
Link copied to clipboard
@NotNull
open fun pitch(): @NotNull ModelRotation
Returns a new rotation with only the pitch component.
Link copied to clipboard
open fun radianX(): Float
Returns the pitch in radians.
Link copied to clipboard
open fun radianY(): Float
Returns the yaw in radians.
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
@NotNull
open fun yaw(): @NotNull ModelRotation
Returns a new rotation with only the yaw component.