BlockEntity

interface BlockEntity

A block entity is an entity that exists as a companion to a block, so that block can store information that would violate the functionality of blocks on their own.

Despite the name, however, these do not behave anything like regular entities. They do not actually exist to the end user, cannot be seen, and only exist to hold data that blocks cannot.

These used to be known as tile entities, for all of you folks who remember those days.

Inheritors

Properties

Link copied to clipboard
abstract val block: Block

The block that this entity is bound to.

Link copied to clipboard
abstract val position: Vec3i

The position of this block entity.

Link copied to clipboard
abstract val type: BlockEntityType<*>

The type of this block entity.

Link copied to clipboard
abstract val world: World

The world this block entity is in.