Pos3i

@Serializable
@SerialName(value = "pos3i")
data class Pos3i(val x: Int, val y: Int, val z: Int) : Pos3DimensionalConvertible<Int, Pos2i, Pos3i> (source)

A class representing a triple of x, y and z (being 3-dimensional integer coordinates), where y is the height in Minecraft.

Constructors

Link copied to clipboard
constructor(x: Int, y: Int, z: Int)

Properties

Link copied to clipboard
open override val x: Int

Horizontal x-coordinate, equivalent of x in a Minecraft world.

Link copied to clipboard
open override val y: Int

Vertical y-coordinate, equivalent of y in a Minecraft world. This coordinate represents the height.

Link copied to clipboard
open override val z: Int

Horizontal z-coordinate, equivalent of z in a Minecraft world. In general maths this would be the y coordinate on a regular 2d plane.

Functions

Link copied to clipboard
open override fun atY(y: Int): Pos3i

Takes the x and z coordinate and adds them together with the given new y.

Link copied to clipboard
open fun toBlockPos(): BlockPos
Link copied to clipboard
open fun toMcBlockPos(): BlockPos
Link copied to clipboard
open fun toMcVec3(): Vec3
Link copied to clipboard
open fun toMcVec3i(): Vec3i
Link copied to clipboard
open fun toMcVector3d(): Vector3d
Link copied to clipboard
open fun toMcVector3f(): Vector3f
Link copied to clipboard
open fun toPair(): Pair<Int, Int>

Converts this position to a basic Kotlin Pair of x and z.

Link copied to clipboard
open fun toTriple(): Triple<Int, Int, Int>

Converts this position to a Kotlin Triple of x, y and z.

Link copied to clipboard
open override fun withoutHeight(): Pos2i

Removes the y coordinate and returns a new instance of Pos2Dimensional.