Skip to content

@minecraft/server


@minecraft/server / BlockTypes

Class: BlockTypes ​

Defined in: @minecraft/server/index.d.ts:5786

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

Methods ​

get() ​

static get(typeName): BlockType | undefined

Defined in: @minecraft/server/index.d.ts:5799

Parameters ​

typeName ​

string

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

Returns ​

BlockType | undefined

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[]

Defined in: @minecraft/server/index.d.ts:5805

Returns ​

BlockType[]

Remarks ​

Returns a collection of all available block types.