- 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 TypeMethodDescriptionThe absolute end (max x, y, z) of this unit.The absolute start (min x, y, z) of this unit.void
fork
(Consumer<Block.Setter> consumer) Creates a fork of this unit depending on the blocks placed within the consumer.Creates a fork of this unit, which will be applied to the instance whenever possible.modifier()
This unit's modifier, used to place blocks and biomes within this unit.sections()
Returns the sections that this unit contains.size()
The size of this unit in blocks.default List
<GenerationUnit> 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
Creates a fork of this unit, which will be applied to the instance whenever possible.- Parameters:
start
- the start of the forkend
- the end of the fork- Returns:
- the fork
-
fork
Creates a fork of this unit depending on the blocks placed within the consumer.- Parameters:
consumer
- the consumer
-
subdivide
Divides this unit into the smallest independent units.- Returns:
- an immutable list of independent units
-
sections
Returns the sections that this unit contains. Coordinates are in section coordinates.- Returns:
- the contained sections
-