Class CountOnEveryLayerModifier
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.placement.PlacementModifier
com.github.darksoulq.abyssallib.world.gen.placement.modifier.CountOnEveryLayerModifier
A placement modifier that duplicates the incoming position stream across every
single Y-coordinate from the bottom of the world to the top.
This is incredibly useful for generating ubiquitous underground features like dense ore veins or cave vines that need to attempt placement at every depth level.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<CountOnEveryLayerModifier> The codec used for serializing and deserializing the layer count modifier.static final PlacementModifierType<CountOnEveryLayerModifier> The registered type definition for the layer count placement modifier. -
Constructor Summary
ConstructorsConstructorDescriptionCountOnEveryLayerModifier(int count) Constructs a new CountOnEveryLayerModifier. -
Method Summary
Modifier and TypeMethodDescriptionStream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Maps each incoming horizontal coordinate to every valid vertical Y-coordinate.getType()Retrieves the specific type definition for this modifier.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the layer count modifier. -
TYPE
The registered type definition for the layer count placement modifier.
-
-
Constructor Details
-
CountOnEveryLayerModifier
public CountOnEveryLayerModifier(int count) Constructs a new CountOnEveryLayerModifier.- Parameters:
count- The number of attempts per horizontal layer.
-
-
Method Details
-
getPositions
public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Maps each incoming horizontal coordinate to every valid vertical Y-coordinate.- Specified by:
getPositionsin classPlacementModifier- Parameters:
context- The current placement context providing world boundaries.positions- The incoming stream of potential placement vectors.- Returns:
- A stream of vectors expanded across the entire vertical axis.
-
getType
Retrieves the specific type definition for this modifier.- Specified by:
getTypein classPlacementModifier- Returns:
- The placement modifier type associated with this modifier.
-