Class HeightRangeModifier

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

public class HeightRangeModifier extends PlacementModifier
A placement modifier that randomizes the Y-coordinate of input positions between a specified minimum and maximum bounds.
  • Field Details

  • Constructor Details

    • HeightRangeModifier

      public HeightRangeModifier(int minInclusive, int maxInclusive)
      Constructs a new HeightRangeModifier.
      Parameters:
      minInclusive - The lowest Y level to place features.
      maxInclusive - The highest Y level to place features.
  • Method Details

    • getPositions

      public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions)
      Replaces the Y coordinate of each input position with a random integer between the configured minimum and maximum bounds.
      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 with randomized vertical positions.
    • 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.