BlockRegistry
Source: registry.ts:55
Constructors
new BlockRegistry(): BlockRegistry
Returns
BlockRegistry
Static Properties
blocks: Record<string, Block>
staticreadonly
registry.ts:60block id to block
Default: {}
states: Record<string, BlockState>
staticreadonly
registry.ts:64state id to block state
Default: {}
Static Methods
getBlock(type: string): Block
static
registry.ts:90Get a block registy item
Parameters
type(string)
Returns
getState(id: string): BlockState
static
registry.ts:99Get a block state registy item
Parameters
id(string)
Returns
load(version: string): Promise<void>
static
registry.ts:71Load block registry from JSON file.
Should be called once time
Parameters
version(string)
Returns
Promise<void>