Class representing custom dimension.

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

Methods

  • Returns boolean

    Whether the sky produces light in the current dimension.

  • 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.

    2.0.2b20

  • Specifies whether the sky produces light (like in overworld) or not (like in the End or Nether).

    Parameters

    • hasSkyLight: boolean

      if true, the sky produces light in the dimension

    Returns CustomDimension

    Reference to itself to be used in sequential calls.

    true
    
  • 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.

Properties

id: number

Custom dimension ID.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.