Interface DimensionRegistry


@NullMarked @AsOf("2.4.0") public interface DimensionRegistry
An interface for registering and modifying custom dimension types on a Minecraft server.
Since:
2.4.0
  • Field Details

  • Method Details

    • registry

      @AsOf("2.4.0") static DimensionRegistry registry()
      Returns:
      the current DimensionRegistry instance.
      Since:
      2.4.0
    • buildDelegate

      @AsOf("2.4.0") Object buildDelegate(Dimension dimension)
      Builds a Dimension into an NMS dimension type. Performs no registration and touches no server state, so it is safe during bootstrap.
      Parameters:
      dimension - the dimension to build
      Returns:
      the built NMS dimension type
      Since:
      2.4.0
    • register

      @AsOf("2.4.0") void register(Dimension dimension)
      Registers a custom dimension type to the server's dimension_type registry.
      Parameters:
      dimension - the dimension to register
      Since:
      2.4.0
    • modify

      @AsOf("2.4.0") void modify(Dimension dimension)
      Modifies a dimension type.
      Parameters:
      dimension - the dimension to modify
      Since:
      2.4.0
    • modify

      @AsOf("2.4.0") void modify(ResourceKey key, Dimension newData)
      Modifies a dimension type.
      Parameters:
      key - the key of the dimension to modify
      newData - the new data for the dimension
      Since:
      2.4.0