Class InSquareModifier

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

public class InSquareModifier extends PlacementModifier
A placement modifier that spreads the input positions randomly across the X and Z axes within the bounds of a standard 16x16 chunk.
  • Field Details

  • Constructor Details

    • InSquareModifier

      public InSquareModifier()
      Constructs a new InSquareModifier.
  • Method Details

    • getPositions

      public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions)
      Applies a random horizontal offset to each incoming position. The offset is between 0 and 15 blocks on both the X and Z axes.
      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 randomly offset horizontally.
    • 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.