Skip to content

@minecraft/server


@minecraft/server / DimensionRegistry

Class: DimensionRegistry ​

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

Provides the functionality for registering custom dimensions. Custom dimensions can only be registered during the system startup event.

Methods ​

registerCustomDimension() ​

registerCustomDimension(typeId): void

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

Parameters ​

typeId ​

string

The namespaced identifier for the custom dimension (e.g., 'mypack:my_dimension'). Must include a namespace and use only valid identifier characters.

Returns ​

void

Remarks ​

Registers a new custom dimension type. Must be called during the system startup event. The dimension will be created using the void generator.

This function can be called in early-execution mode.

Throws ​

This function can throw errors.

CustomDimensionAlreadyRegisteredError

CustomDimensionInvalidRegistryError

CustomDimensionNameError

CustomDimensionReloadNewDimensionError

minecraftcommon.EngineError

NamespaceNameError