Script API - v1.21.90.25
    Preparing search index...

    Used for accessing all available dimension types.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      • dimensionTypeId: string

      Returns DimensionType

      Retrieves a dimension type using a string-based identifier.

      This function can be called in early-execution mode.

    • Returns DimensionType[]

      Retrieves an array of all dimension types.

      This function can be called in early-execution mode.

      import { DimensionTypes, world } from "@minecraft/server";

      const dimensions = DimensionTypes.getAll();
      for (const dimensionType of dimensions) {
      world.sendMessage(dimensionType.typeId);
      }

      // minecraft:overworld
      // minecraft:nether
      // minecraft:the_end