Block

interface Block<T : Tile> : Copiable<Block<T>>

A Block is a voxel that consists of Tiles representing each side, and the internal content of the Block. All sides of the Block are optional. If any of them are missing the emptyTile will be used when the sides are dereferenced. If you want to have multiple Tiles in any side (or as the content) try using a StackedTile.

Types

Companion
Link copied to clipboard
common
object Companion

Functions

component1
Link copied to clipboard
common
open operator fun component1(): T
component2
Link copied to clipboard
common
open operator fun component2(): T
component3
Link copied to clipboard
common
open operator fun component3(): T
component4
Link copied to clipboard
common
open operator fun component4(): T
component5
Link copied to clipboard
common
open operator fun component5(): T
component6
Link copied to clipboard
common
open operator fun component6(): T
component7
Link copied to clipboard
common
open operator fun component7(): T
createCopy
Link copied to clipboard
common
abstract fun createCopy(): Block<T>
Creates a deep copy of this object.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getTileByType
Link copied to clipboard
common
abstract fun getTileByType(blockTileType: BlockTileType): T
Returns the tile from this Block for the given blockTileType.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
isEmpty
Link copied to clipboard
common
abstract fun isEmpty(): Boolean
Tells whether this Block is empty (all of its sides and content are the the emptyTile).
toBuilder
Link copied to clipboard
common
abstract fun toBuilder(): BlockBuilder<T>
Creates a new BlockBuilder preconfigured with the contents of this Block.
toString
Link copied to clipboard
common
open fun toString(): String
withFlippedAroundX
Link copied to clipboard
common
abstract fun withFlippedAroundX(): Block<T>
Returns a new Block which is a rotation of this Block around the x axis.
withFlippedAroundY
Link copied to clipboard
common
abstract fun withFlippedAroundY(): Block<T>
Returns a new Block which is a rotation of this Block around the y axis.
withFlippedAroundZ
Link copied to clipboard
common
abstract fun withFlippedAroundZ(): Block<T>
Returns a new Block which is a rotation of this Block around the z axis.

Properties

back
Link copied to clipboard
common
abstract var back: T
bottom
Link copied to clipboard
common
abstract var bottom: T
content
Link copied to clipboard
common
abstract var content: T
emptyTile
Link copied to clipboard
common
abstract val emptyTile: T
front
Link copied to clipboard
common
abstract var front: T
left
Link copied to clipboard
common
abstract var left: T
right
Link copied to clipboard
common
abstract var right: T
tiles
Link copied to clipboard
common
abstract val tiles: Map<BlockTileType, T>
top
Link copied to clipboard
common
abstract var top: T

Inheritors

BaseBlock
Link copied to clipboard

Sources

(source)
Link copied to clipboard