Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing custom dimension

Hierarchy

  • CustomDimension

Index

Constructors

  • Constructs a new dimension with specified name and preferred id

    Parameters

    • name: string

      dimension name, can be used to get dimension via Dimensions.getDimensionByName call

    • preferredId: number

      preferred dimension id. If id is already occupied by some another dimension, constructor will look for the next empty dimension id and assign it to the current dimension

    Returns CustomDimension

Properties

id: number

Custom dimension id

Methods

  • hasSkyLight(): boolean
  • Sets clouds color for the dimension in the RGB format. Default color is as in the Overworld

    Parameters

    • r: number

      red color component, value from 0 to 1

    • g: number

      green color component, value from 0 to 1

    • b: number

      blue color component, value from 0 to 1

    Returns CustomDimension

    reference to itself to be used in sequential calls

  • Sets fog color for the dimension in the RGB format. Default color is as in the Overworld

    Parameters

    • r: number

      red color component, value from 0 to 1

    • g: number

      green color component, value from 0 to 1

    • b: number

      blue color component, value from 0 to 1

    Returns CustomDimension

    reference to itself to be used in sequential calls

  • Sets fog displaying distance

    Parameters

    • start: number

      nearest fog distance

    • end: number

      farthest fog distance

    Returns CustomDimension

    reference to itself to be used in sequential calls

  • Specifies whether the sky produces light (like in overworld) or not (like in the End or Nether). By default this value is true

    Parameters

    • hasSkyLight: boolean

      if true, the sky produces light in the dimension

    Returns CustomDimension

    reference to itself to be used in sequential calls

  • Sets sky color for the dimension in the RGB format. Default color is as in the Overworld

    Parameters

    • r: number

      red color component, value from 0 to 1

    • g: number

      green color component, value from 0 to 1

    • b: number

      blue color component, value from 0 to 1

    Returns CustomDimension

    reference to itself to be used in sequential calls

  • Sets sunset sky color for the dimension in the RGB format. Default color is as in the Overworld

    Parameters

    • r: number

      red color component, value from 0 to 1

    • g: number

      green color component, value from 0 to 1

    • b: number

      blue color component, value from 0 to 1

    Returns CustomDimension

    reference to itself to be used in sequential calls

Generated using TypeDoc