Class: BlockEntities
Defined in: packages/minerender/src/assets/BlockEntities.ts:42
Constructors
Constructor
new BlockEntities(): BlockEntities;Returns
BlockEntities
Methods
entry()
static entry(index, block): Maybe<BlockEntityEntry>;Defined in: packages/minerender/src/assets/BlockEntities.ts:65
The index entry of a block ID such as minecraft:chest.
Parameters
| Parameter | Type |
|---|---|
index | BlockEntityIndex |
block | string |
Returns
getIndex()
static getIndex(root?): Promise<BlockEntityIndex>;Defined in: packages/minerender/src/assets/BlockEntities.ts:49
Loads the block index of a version. Versions and sources without one yield an empty index, and so does a failed load: the index is optional, and blocks must not retry or fail with it one by one. The empty result is cached like any other; Caching.clear() or AssetLoader.setVersion() forces a new attempt.
Parameters
| Parameter | Type |
|---|---|
root? | string |
Returns
Promise<BlockEntityIndex>
matrix()
static matrix(resolved, matrix?): Matrix4;Defined in: packages/minerender/src/assets/BlockEntities.ts:89
Placement in block space (0..16 per axis), applied on top of the model's own transform.
Parameters
| Parameter | Type |
|---|---|
resolved | ResolvedBlockEntity |
matrix | Matrix4 |
Returns
Matrix4
resolve()
static resolve(
index,
block,
state?
): Maybe<ResolvedBlockEntity>;Defined in: packages/minerender/src/assets/BlockEntities.ts:71
Selects the parts and placement for a block ID such as minecraft:chest; undefined when nothing is drawn.
Parameters
| Parameter | Type |
|---|---|
index | BlockEntityIndex |
block | string |
state | BlockStateProperties |