Rotation

interface Rotation

Represents a rotation defined by yaw and pitch angles (in degrees).

This is used as the result type for rotation arguments in commands.

Example usage in a command:

rotation("rot") {
executes { context ->
val resolver = context.getArgument("rot", RotationResolver::class.java)
val rot = resolver.resolve(context.source)
println("Yaw: ${rot.yaw}, Pitch: ${rot.pitch}")
1
}
}

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val pitch: Float

The pitch angle in degrees (vertical rotation, -90 to 90).

Link copied to clipboard
abstract val yaw: Float

The yaw angle in degrees (horizontal rotation, -180 to 180).