Interface Marker

All Superinterfaces:
DensityFunction, Keyed, Registerable<Marker>, Wrapper

@NullMarked @AsOf("3.0.0") public interface Marker extends DensityFunction, Registerable<Marker>
Marker functions are commonly used to cache the output of a density function.
Since:
3.0.0
See Also:
  • Method Details

    • type

      @AsOf("3.0.0") Marker.Type type()
      The type of the marker.
      Returns:
      the type of the marker
      Since:
      3.0.0
    • input

      @AsOf("3.0.0") DensityFunction input()
      The input density function.
      Returns:
      the input density function
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static Marker of(@Nullable ResourceKey resourceKey, Marker.Type type, DensityFunction input)
      Creates a new marker.
      Parameters:
      resourceKey - the resource key, or null
      type - the type of the marker
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0
    • of

      static Marker of(Marker.Type type, DensityFunction input)
      Creates a new marker.
      Parameters:
      type - the type of the marker
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0
    • interpolated

      @AsOf("3.0.0") static Marker interpolated(DensityFunction input)
      Interpolates at each block in one cell based on the input density function value of some cells around. The size of each cell is size_horizontal * 4 and size_vertical * 4. Used often in combination with flat_cache.
      Parameters:
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0
    • flatCache

      @AsOf("3.0.0") static Marker flatCache(DensityFunction input)
      Calculate the value per 4×4 column (Value at each block in one column is the same). And it is calculated only once per column, at Y=0. Used often in combination with interpolated.
      Parameters:
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0
    • cache2d

      @AsOf("3.0.0") static Marker cache2d(DensityFunction input)
      Only computes the input density once per horizontal position.
      Parameters:
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0
    • cacheOnce

      @AsOf("3.0.0") static Marker cacheOnce(DensityFunction input)
      If this density function is referenced twice, it is only computed once per block position.
      Parameters:
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0
    • cacheAllInCell

      @AsOf("3.0.0") static Marker cacheAllInCell(DensityFunction input)
      Used by the game onto NoiseRouter.finalDensity().
      Parameters:
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0
    • blendDensity

      @AsOf("3.0.0") static Marker blendDensity(DensityFunction input)
      Used in vanilla for smooth transition to chunks generated in old versions.
      Parameters:
      input - the input density function
      Returns:
      the marker
      Since:
      3.0.0