PylonEntityHolderBlock

A block that has one or more associated Pylon entities. For example, a pedestal that uses an item display to show the item would implement this to keep track of the item display.

Note that the Pylon entities may not be loaded at the same time that the block is loaded.

Inheritors

Properties

Link copied to clipboard
@get:ApiStatus.NonExtendable
open val heldEntities: MutableMap<String, UUID>

Functions

Link copied to clipboard
open fun addEntity(name: String, entity: PylonEntity<*>)
open fun addEntity(name: String, entity: Entity)
Link copied to clipboard
@ApiStatus.NonExtendable
open fun areAllHeldEntitiesLoaded(): Boolean

Returns false if any entity is unloaded or does not exist.

Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntity(name: String): Entity?
@ApiStatus.NonExtendable
open fun <T : Entity> getHeldEntity(clazz: Class<T>, name: String): T?
Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntityOrThrow(name: String): Entity
@ApiStatus.NonExtendable
open fun <T : Entity> getHeldEntityOrThrow(clazz: Class<T>, name: String): T
Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntityUuid(name: String): UUID?
Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntityUuidOrThrow(name: String): UUID
Link copied to clipboard
@ApiStatus.NonExtendable
open fun <T : PylonEntity<*>> getHeldPylonEntity(clazz: Class<T>, name: String): T?
Link copied to clipboard
@ApiStatus.NonExtendable
open fun <T : PylonEntity<*>> getHeldPylonEntityOrThrow(clazz: Class<T>, name: String): T
Link copied to clipboard
@ApiStatus.NonExtendable
open fun isHeldEntityPresent(name: String): Boolean

Returns false if the block holds no entity with the provided name, the entity is unloaded or does not physically exist.

Link copied to clipboard
open fun onBreak(drops: MutableList<ItemStack>, context: BlockBreakContext)
Link copied to clipboard
@MustBeInvokedByOverriders
open override fun postBreak()