Skip to content

Class: BlockStateResolver ​

Defined in: packages/minerender/src/model/block/BlockStateResolver.ts:19

Constructors ​

Constructor ​

ts
new BlockStateResolver(): BlockStateResolver;

Returns ​

BlockStateResolver

Methods ​

choose() ​

ts
static choose(variants): BlockStateVariant;

Defined in: packages/minerender/src/model/block/BlockStateResolver.ts:73

Parameters ​

ParameterType
variants| BlockStateVariant | BlockStateVariant[]

Returns ​

BlockStateVariant


defaults() ​

ts
static defaults(blockState): Promise<BlockStateProperties>;

Defined in: packages/minerender/src/model/block/BlockStateResolver.ts:21

Parameters ​

ParameterType
blockStateBlockState

Returns ​

Promise<BlockStateProperties>


matching() ​

ts
static matching(blockState, state): (
  | BlockStateVariant
  | BlockStateVariant[])[];

Defined in: packages/minerender/src/model/block/BlockStateResolver.ts:49

Parameters ​

ParameterType
blockStateBlockState
stateBlockStateProperties

Returns ​

( | BlockStateVariant | BlockStateVariant[])[]


rotation() ​

ts
static rotation(variant): Euler;

Defined in: packages/minerender/src/model/block/BlockStateResolver.ts:91

Parameters ​

ParameterType
variantBlockStateVariant

Returns ​

Euler


select() ​

ts
static select(
   blockState, 
   state, 
   choose?
): BlockStateVariant[];

Defined in: packages/minerender/src/model/block/BlockStateResolver.ts:44

Parameters ​

ParameterType
blockStateBlockState
stateBlockStateProperties
choose(variants) => BlockStateVariant

Returns ​

BlockStateVariant[]