Interface LevelStemEditor


@NullMarked @AsOf("2.3.0") @Experimental public interface LevelStemEditor
Edits a loaded world's biome distribution at runtime. Unlike the bootstrap datapack, this reads the live biome source off each world's generator and swaps in an edited one, so it works for any dimension including the end and custom dimensions.
Since:
2.3.0
See Also:
  • Field Details

  • Method Details

    • create

      @AsOf("2.3.0") static LevelStemEditor create()
      Creates a new DimensionEditor backed by the runtime biome source swap implementation.
      Returns:
      a new DimensionEditor instance
      Since:
      2.3.0
    • addToDimension

      @AsOf("2.3.0") LevelStemEditor addToDimension(ResourceKey dimension, ResourceKey biome, ClimatePoint point)
      Queues a biome addition to a dimension.
      Parameters:
      dimension - the dimension to edit
      biome - the biome to add
      point - where in climate space the biome wins
      Returns:
      this editor instance
      Since:
      2.3.0
    • replaceInDimension

      @AsOf("2.3.0") LevelStemEditor replaceInDimension(ResourceKey dimension, ResourceKey target, ResourceKey replacement)
      Queues a biome replacement in a dimension.
      Parameters:
      dimension - the dimension to edit
      target - the biome key to replace
      replacement - the biome key to generate in its place
      Returns:
      this editor instance
      Since:
      2.3.0
    • apply

      @AsOf("2.3.0") void apply()
      Applies all queued edits to every loaded world whose dimension matches. Worlds loaded after this call are not touched, use apply(World).
      Since:
      2.3.0
    • apply

      @AsOf("2.3.0") void apply(World world)
      Applies the queued edits matching the given world's dimension to its live generator.
      Parameters:
      world - the world to edit
      Since:
      2.3.0