Skip to main content

Class: BlockTypes

Contains a catalog of Minecraft Block Types that are available in this world.

Constructors

new BlockTypes()

private new BlockTypes(): BlockTypes

Returns

BlockTypes

Methods

get()

static get(typeName): BlockType

Parameters

ParameterTypeDescription
typeNamestringIdentifier of the block type. Should follow a namespace:id
pattern, such as minecraft:dirt.

Returns

BlockType

BlockType object, or undefined if the block type is not available within this world.

Remarks

Returns a BlockType object for the specified identifier.


getAll()

static getAll(): BlockType[]

Returns

BlockType[]

Remarks

Returns a collection of all available block types.