Interface GenerationUnit

All Known Implementing Classes:
GeneratorImpl.UnitImpl

public interface GenerationUnit
Represents an area that can be generated.

The size is guaranteed to be a multiple of 16 (section).

  • Method Summary

    Modifier and Type
    Method
    Description
    The absolute end (max x, y, z) of this unit.
    The absolute start (min x, y, z) of this unit.
    void
    Creates a fork of this unit depending on the blocks placed within the consumer.
    fork(Point start, Point end)
    Creates a fork of this unit, which will be applied to the instance whenever possible.
    This unit's modifier, used to place blocks and biomes within this unit.
    default Set<Vec>
    Returns the sections that this unit contains.
    The size of this unit in blocks.
    Divides this unit into the smallest independent units.
  • Method Details

    • modifier

      UnitModifier modifier()
      This unit's modifier, used to place blocks and biomes within this unit.
      Returns:
      the modifier
    • size

      Point size()
      The size of this unit in blocks.

      Guaranteed to be a multiple of 16.

      Returns:
      the size of this unit
    • absoluteStart

      Point absoluteStart()
      The absolute start (min x, y, z) of this unit.
      Returns:
      the absolute start
    • absoluteEnd

      Point absoluteEnd()
      The absolute end (max x, y, z) of this unit.
      Returns:
      the absolute end
    • fork

      GenerationUnit fork(Point start, Point end)
      Creates a fork of this unit, which will be applied to the instance whenever possible.
      Parameters:
      start - the start of the fork
      end - the end of the fork
      Returns:
      the fork
    • fork

      void fork(Consumer<Block.Setter> consumer)
      Creates a fork of this unit depending on the blocks placed within the consumer.
      Parameters:
      consumer - the consumer
    • subdivide

      default List<GenerationUnit> subdivide()
      Divides this unit into the smallest independent units.
      Returns:
      an immutable list of independent units
    • sections

      default Set<Vec> sections()
      Returns the sections that this unit contains. Coordinates are in section coordinates.
      Returns:
      the contained sections