Class CountOnEveryLayerModifier

java.lang.Object
com.github.darksoulq.abyssallib.world.gen.placement.PlacementModifier
com.github.darksoulq.abyssallib.world.gen.placement.modifier.CountOnEveryLayerModifier

public class CountOnEveryLayerModifier extends PlacementModifier
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 Details

  • 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:
      getPositions in class PlacementModifier
      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

      public PlacementModifierType<?> getType()
      Retrieves the specific type definition for this modifier.
      Specified by:
      getType in class PlacementModifier
      Returns:
      The placement modifier type associated with this modifier.