Class CountModifier

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

public class CountModifier extends PlacementModifier
A placement modifier that duplicates the incoming position stream a specified number of times. This is typically the first modifier in a placement sequence, determining how many attempts are made to place a feature within a chunk.
  • Field Details

  • Constructor Details

    • CountModifier

      public CountModifier(int count)
      Constructs a new CountModifier.
      Parameters:
      count - The number of placement attempts per input position.
  • Method Details

    • getPositions

      public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions)
      Duplicates each position in the input stream by the configured count.
      Specified by:
      getPositions in class PlacementModifier
      Parameters:
      context - The current placement context.
      positions - The incoming stream of potential placement vectors.
      Returns:
      A stream of vectors duplicated by the configured count.
    • getType

      public PlacementModifierType<?> getType()
      Description copied from class: PlacementModifier
      Retrieves the placement modifier type used for identifying this specific implementation.
      Specified by:
      getType in class PlacementModifier
      Returns:
      The placement modifier type associated with this instance.