Class PineFoliagePlacer

java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.foliage.FoliagePlacer
com.github.darksoulq.abyssallib.world.gen.feature.tree.foliage.PineFoliagePlacer

public class PineFoliagePlacer extends FoliagePlacer
A foliage placer that generates a conical, layered structure.

This mimics the natural shape of conifers (spruce, pine), where the radius of the leaves gradually widens as it approaches the bottom of the canopy, occasionally stepping inwards to create horizontal ridges.

  • Field Details

  • Constructor Details

    • PineFoliagePlacer

      public PineFoliagePlacer(int height)
      Constructs a new PineFoliagePlacer.
      Parameters:
      height - The total number of vertical layers the foliage spans downwards.
  • Method Details

    • placeFoliage

      public void placeFoliage(WorldGenAccess level, Random random, org.bukkit.Location attachmentPoint, BlockStateProvider foliageProvider, int radius)
      Generates a conical structure of leaves downwards from the attachment point.
      Specified by:
      placeFoliage in class FoliagePlacer
      Parameters:
      level - The world generation accessor.
      random - The deterministic random source.
      attachmentPoint - The top-center location of the foliage.
      foliageProvider - The block state provider for the leaf material.
      radius - The maximum horizontal radius at the base of the cone.
    • getType

      public FoliagePlacerType<?> getType()
      Retrieves the specific type definition for this foliage placer.
      Specified by:
      getType in class FoliagePlacer
      Returns:
      The foliage placer type associated with this instance.