LevelBuilder

Represents a builder for creating LevelZ Levels.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun block(block: Block, coordinate: Coordinate): LevelBuilder
fun block(name: String, properties: Map<String, Any>, vararg coordinates: Coordinate): LevelBuilder
fun block(name: String, properties: Map<String, Any>, coordinates: Iterable<Coordinate>): LevelBuilder
fun block(name: String, properties: Map<String, Any>, coordinate: Coordinate): LevelBuilder
fun block(block: Block, x: Int, y: Int): LevelBuilder
fun block(block: Block, x: Int, y: Int, z: Int): LevelBuilder

Adds a block to the level.

fun block(name: String, vararg coordinate: Coordinate): LevelBuilder
fun block(name: String, coordinates: Iterable<Coordinate>): LevelBuilder
fun block(name: String, coordinate: Coordinate): LevelBuilder

Adds a block with no properties to the level.

Link copied to clipboard
fun blocks(vararg blocks: LevelObject): LevelBuilder

Adds multiple blocks to the level.

Link copied to clipboard
fun build(): Level

Builds the level.

Link copied to clipboard

Gets an immutable copy of the current blocks of the level.

Link copied to clipboard

Gets the current dimension of the level.

Link copied to clipboard

Gets an immutable copy of the current headers of the level.

Link copied to clipboard
fun header(key: String, value: String?): LevelBuilder

Sets a header value.

Link copied to clipboard

Sets multiple header values.

Link copied to clipboard

Loads a level into the builder.

Link copied to clipboard

Performs a matrix operation.

fun matrix(block: Block, cx: Int, cy: Int, x1: Int, x2: Int, y1: Int, y2: Int): LevelBuilder

Performs a 2D block matrix operation.

fun matrix(block: Block, cx: Int, cy: Int, cz: Int, x1: Int, x2: Int, y1: Int, y2: Int, z1: Int, z2: Int): LevelBuilder

Performs a 3D block matrix operation.

Link copied to clipboard
fun scroll(scroll: Scroll?): LevelBuilder

Sets the scroll direction for the level.

Link copied to clipboard

Sets the spawn point for the level.