Chunk

Represents a chunk, or a 16 x 16 x world height area of blocks.

Functions

Link copied to clipboard
abstract fun getBiome(position: Vec3i): Biome

Gets the biome at the given position.

abstract fun getBiome(x: Int, y: Int, z: Int): Biome

Gets the biome at the given x, y, and z coordinates.

Link copied to clipboard
abstract fun getBlock(position: Vec3i): BlockState

Gets the block at the given position.

abstract fun getBlock(x: Int, y: Int, z: Int): BlockState

Gets the block at the given x, y, and z coordinates.

Link copied to clipboard
abstract fun <E : Entity> getEntitiesOfType(type: Class<E>): Collection<E>

Gets all entities of the given type contained within this container.

abstract fun <E : Entity> getEntitiesOfType(type: Class<E>, predicate: Predicate<E>): Collection<E>

Gets all entities of the given type matching the given predicate contained within this container.

Link copied to clipboard
abstract fun getFluid(position: Vec3i): FluidState

Gets the fluid at the given position.

abstract fun getFluid(x: Int, y: Int, z: Int): FluidState

Gets the fluid at the given x, y, and z coordinates.

Properties

Link copied to clipboard
abstract override val entities: Collection<Entity>

All of the entities currently in this chunk.

Link copied to clipboard
abstract val inhabitedTime: Long

The cumulative number of ticks players have been in this chunk.

Link copied to clipboard
abstract val lastUpdate: Long

The time that this chunk was last updated. This is set when the chunk is saved to disk.

Link copied to clipboard
abstract override val players: Collection<Player>

All of the players currently in this chunk.

Link copied to clipboard
abstract val world: World

The world this chunk is in.

Link copied to clipboard
abstract val x: Int

The X position of this chunk.

Link copied to clipboard
abstract val z: Int

The Z position of this chunk.