Class HeightmapModifier

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

public class HeightmapModifier extends PlacementModifier
A placement modifier that snaps the Y-coordinate of incoming positions to the highest block at that specific X and Z coordinate, dictated by a selected heightmap.
  • Field Details

  • Constructor Details

    • HeightmapModifier

      public HeightmapModifier(org.bukkit.HeightMap heightmap)
      Constructs a new HeightmapModifier.
      Parameters:
      heightmap - The Bukkit heightmap criteria to apply.
  • Method Details

    • getPositions

      public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions)
      Projects the Y-coordinate of each incoming position to the surface defined by the heightmap.
      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 mapped directly onto the heightmap surface.
    • 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 heightmap modifier.