Class Dimension.Builder

java.lang.Object
dev.wyck.level.dimension.Dimension.Builder
Enclosing interface:
Dimension

@AsOf("2.4.0") public static class Dimension.Builder extends Object
Builder for Dimension. Defaults approximate the vanilla overworld so a minimally configured build is valid.
Since:
2.4.0
  • Constructor Details

    • Builder

      @AsOf("2.4.0") public Builder()
    • Builder

      @AsOf("2.4.0") public Builder(Dimension dimension)
  • Method Details

    • resourceKey

      @AsOf("2.4.0") public Dimension.Builder resourceKey(ResourceKey resourceKey)
      Sets the resource key of this dimension type.
      Parameters:
      resourceKey - the resource key of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • hasFixedTime

      @AsOf("2.4.0") public Dimension.Builder hasFixedTime(boolean hasFixedTime)
      Sets whether this dimension type has a fixed time.
      Parameters:
      hasFixedTime - whether this dimension type has a fixed time.
      Returns:
      this builder
      Since:
      2.4.0
    • hasSkyLight

      @AsOf("2.4.0") public Dimension.Builder hasSkyLight(boolean hasSkyLight)
      If there should be light that comes from the sky.
      Parameters:
      hasSkyLight - whether this dimension type has sky light.
      Returns:
      this builder
      Since:
      2.4.0
    • hasCeiling

      @AsOf("2.4.0") public Dimension.Builder hasCeiling(boolean hasCeiling)
      Sets whether this dimension type has a ceiling (e.g., the nether).
      Parameters:
      hasCeiling - whether this dimension type has a ceiling.
      Returns:
      this builder
      Since:
      2.4.0
    • hasEnderDragonFight

      @AsOf("2.4.0") public Dimension.Builder hasEnderDragonFight(boolean hasEnderDragonFight)
      Sets whether this dimension type has an ender dragon fight.
      Parameters:
      hasEnderDragonFight - whether this dimension type has an ender dragon fight.
      Returns:
      this builder
      Since:
      2.4.0
    • coordinateScale

      @AsOf("2.4.0") public Dimension.Builder coordinateScale(double coordinateScale)
      Sets the coordinate scale of this dimension type.
      Parameters:
      coordinateScale - the coordinate scale of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • minY

      @AsOf("2.4.0") public Dimension.Builder minY(int minY)
      Sets the minimum Y of this dimension type.
      Parameters:
      minY - the minimum Y of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • height

      @AsOf("2.4.0") public Dimension.Builder height(int height)
      Sets the height of this dimension type.
      Parameters:
      height - the height of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • logicalHeight

      @AsOf("2.4.0") public Dimension.Builder logicalHeight(int logicalHeight)
      Sets the logical height of this dimension type.
      Parameters:
      logicalHeight - the logical height of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • infiniburn

      @AsOf("2.4.0") public Dimension.Builder infiniburn(Infiniburn infiniburn)
      Sets the infiniburn of this dimension type.
      Parameters:
      infiniburn - the infiniburn of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • ambientLight

      @AsOf("2.4.0") public Dimension.Builder ambientLight(float ambientLight)
      Sets the ambient light of this dimension type.
      Parameters:
      ambientLight - the ambient light level of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • monsterSettings

      @AsOf("2.4.0") public Dimension.Builder monsterSettings(MonsterSettings monsterSettings)
      Sets the monster settings of this dimension type.
      Parameters:
      monsterSettings - the monster settings of this dimension type.
      Returns:
      this builder
      Since:
      2.4.0
    • skybox

      @AsOf("2.4.0") public Dimension.Builder skybox(Skybox skybox)
      Sets the skybox of this dimension type.
      Parameters:
      skybox - the skybox of this dimension type
      Returns:
      this builder
      Since:
      2.4.0
    • cardinalLightType

      @AsOf("2.4.0") public Dimension.Builder cardinalLightType(CardinalLightType cardinalLightType)
      Sets the cardinal light type of this dimension type.
      Parameters:
      cardinalLightType - the cardinal light type of this dimension type
      Returns:
      this builder
      Since:
      2.4.0
    • attributes

      @AsOf("2.4.0") public Dimension.Builder attributes(EnvironmentAttributeMap attributes)
      Sets the attributes of this dimension type.
      Parameters:
      attributes - the attributes of this dimension type
      Returns:
      this builder
      Since:
      2.4.0
    • attribute

      @AsOf("2.4.0") public <V> Dimension.Builder attribute(EnvironmentAttributeSupplier<V> supplier, V value)
      Adds an attribute to this dimension type.
      Type Parameters:
      V - the type of the attribute value
      Parameters:
      supplier - the attribute supplier
      value - the value of the attribute
      Returns:
      this builder
      Since:
      2.4.0
    • attribute

      @AsOf("2.4.0") public Dimension.Builder attribute(FriendlyColorSupplier supplier, String hex)
      Adds a color attribute to this dimension type.
      Parameters:
      supplier - the color attribute supplier
      hex - the hex value of the color attribute
      Returns:
      this builder
      Since:
      2.4.0
    • timelines

      @AsOf("3.2.0") public Dimension.Builder timelines(Set<Timeline> timelines)
      Sets the timelines of this dimension type.
      Parameters:
      timelines - the timelines of this dimension type
      Returns:
      this builder
      Since:
      3.2.0
    • timelines

      @AsOf("3.2.0") public Dimension.Builder timelines(TagKey timelines)
      Sets the tagKey of timelines of this dimension type.
      Parameters:
      timelines - the tagKey of timelines of this dimension type
      Returns:
      this builder
      Since:
      3.2.0
    • defaultClock

      @AsOf("2.4.0") public Dimension.Builder defaultClock(@Nullable WorldClock defaultClock)
      Sets the default clock of this dimension type.
      Parameters:
      defaultClock - the default clock of this dimension type
      Returns:
      this builder
      Since:
      2.4.0
    • timeline

      @AsOf("3.2.0") public Dimension.Builder timeline(Timeline timeline)
      Adds a timeline to this dimension type.
      Parameters:
      timeline - the timeline to add
      Returns:
      this builder
      Since:
      3.2.0
    • build

      @AsOf("2.4.0") public Dimension build()
      Builds a new Dimension with the given properties.
      Returns:
      a new Dimension with the given properties.
      Throws:
      IllegalArgumentException - if the properties are invalid
      Since:
      2.4.0
    • register

      @AsOf("2.4.0") public Dimension register()
    • modify

      @AsOf("3.0.0") public Dimension modify()