ServerPos3d

class ServerPos3d @JvmOverloads constructor(world: McServerWorld?, var x: Double, var y: Double, var z: Double, var yaw: Float = 0.0f, var pitch: Float = 0.0f)

Represents a mutable position in the world, similar to a "Location" in Bukkit.

This class defines a 3D position within the Minecraft world, including coordinates (x, y, z) and orientation (yaw and pitch).

Constructors

Link copied to clipboard
constructor()
constructor(world: McServerWorld?, x: Double, y: Double, z: Double, yaw: Float = 0.0f, pitch: Float = 0.0f)

Properties

Link copied to clipboard

Computes the unit vector (look angle) representing the entity's orientation based on its yaw and pitch angles.

Link copied to clipboard

The pitch (vertical rotation) angle of the entity at this position (default is 0 degrees).

Link copied to clipboard

The McServerWorld in which this position is located.

Link copied to clipboard
var x: Double

The x-coordinate of the position.

Link copied to clipboard
var y: Double

The y-coordinate of the position.

Link copied to clipboard
var yaw: Float

The yaw (horizontal rotation) angle of the entity at this position (default is 0 degrees).

Link copied to clipboard
var z: Double

The z-coordinate of the position.

Functions

Link copied to clipboard

Calculates the squared distance between this position and another position.

Link copied to clipboard

Converts this server position to a simple 3D position (x, y, z) represented by Pos3d.