entityItemBacked

abstract fun entityItemBacked(stateSelector: BlockSelectorScope.() -> BlockData = DEFAULT_BLOCK_STATE_SELECTOR, eraseSelectedVanillaModels: Boolean = false, extraColliderSelector: BlockSelectorScope.() -> List<ColliderCube> = DEFAULT_EXTRA_COLLIDER_SELECTOR, extraHitboxSelector: BlockSelectorScope.() -> List<HitboxCuboid> = { extraColliderSelector().map(HitboxCuboid::fromCollider) }, itemSelector: ItemModelDefinitionBuilder<BlockModelSelectorScope>.() -> Unit = DEFAULT_CONFIGURE_BLOCK_MODEL_SELECTOR)

Configures the model and hitboxes and colliders of this entity-based block model via itemSelector, stateSelector, extraColliderSelector and extraHitboxSelector.

If eraseSelectedVanillaModels is enabled, the states selected by stateSelector will be made invisible, making the vanilla blocks entity-backed as well.

Entity-backed custom block models based on custom item definitions are less performant than state-backed models, but a lot more flexible. In contrast to entityBacked, models defined via custom item definitions cannot benefit from display entity transformations, as some selection functionality is client-side only. As such, oversized models are not supported.

Feature list:

  • They can take advantage of 1.21.4's item model definition system, which makes it possible to use special model types such as chest or signs.

  • They can display transparent models

  • There is no limit to the amount of different models

  • Every vanilla block type can be used as the base block inside the display entity. This allows for very customizable colliders

  • The item display entities can be accessed and updated at runtime.