Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CustomDimension

Class representing custom dimension

Hierarchy

  • CustomDimension

Index

Constructors

constructor

  • Constructs a new dimension with specified name and preffered

    Parameters

    • name: string

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

    • preferedId: number

      prefered 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

id: number

Custom dimension id

Methods

hasSkyLight

  • hasSkyLight(): boolean
  • Returns boolean

    whether the sky produces light in the current dimension

resetCloudColor

resetFogColor

resetFogDistance

resetSkyColor

resetSunsetColor

setCloudColor

  • 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

setFogColor

  • 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

setFogDistance

  • 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

setGenerator

setHasSkyLight

  • 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

setSkyColor

  • 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

setSunsetColor

  • 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