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
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<PineFoliagePlacer> The codec used for serializing and deserializing the pine foliage placer.static final FoliagePlacerType<PineFoliagePlacer> The registered type definition for the pine foliage placer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()Retrieves the specific type definition for this foliage placer.voidplaceFoliage(WorldGenAccess level, Random random, org.bukkit.Location attachmentPoint, BlockStateProvider foliageProvider, int radius) Generates a conical structure of leaves downwards from the attachment point.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the pine foliage placer. -
TYPE
The registered type definition for the pine foliage placer.
-
-
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:
placeFoliagein classFoliagePlacer- 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
Retrieves the specific type definition for this foliage placer.- Specified by:
getTypein classFoliagePlacer- Returns:
- The foliage placer type associated with this instance.
-