ChunkPos

data class ChunkPos(val worldUUID: UUID, val x: Int, val z: Int)

A position of a chunk.

Parameters

worldUUID

The UUID of the world this chunk is in.

x

The x coordinate of the chunk.

z

The z coordinate of the chunk.

Constructors

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

Properties

Link copied to clipboard
val chunk: Chunk?

The Chunk at this ChunkPos, may be null if world is null.

Link copied to clipboard
val world: World?

The world of this ChunkPos, may be null if no world with worldUUID exists.

Link copied to clipboard
Link copied to clipboard
val x: Int
Link copied to clipboard
val z: Int

Functions

Link copied to clipboard
fun blockPos(x: Int, y: Int, z: Int): BlockPos

Gets the BlockPos at the specified chunk coordinates x, y, z.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getInRange(range: Int): Set<ChunkPos>
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Checks whether the chunk at this position is loaded.

Link copied to clipboard
fun toLong(): Long

Converts the chunk position to a long, where the 32 most significant bits are the z coordinate and the 32 least significant bits are the x coordinate.