Class BlobFoliagePlacer
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.foliage.FoliagePlacer
com.github.darksoulq.abyssallib.world.gen.feature.tree.foliage.BlobFoliagePlacer
A standard foliage placer that generates a layered spherical blob of leaves.
This replicates the iconic leaf shape of standard Minecraft Oak and Birch trees.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlobFoliagePlacer> The codec used for serializing and deserializing the blob foliage placer.static final FoliagePlacerType<BlobFoliagePlacer> The registered type definition for the blob 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 cascading blob of leaves downwards from the attachment point.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the blob foliage placer. -
TYPE
The registered type definition for the blob foliage placer.
-
-
Constructor Details
-
BlobFoliagePlacer
public BlobFoliagePlacer(int height) Constructs a new BlobFoliagePlacer.- Parameters:
height- The number of vertical layers the blob spans downwards from the attachment point.
-
-
Method Details
-
placeFoliage
public void placeFoliage(WorldGenAccess level, Random random, org.bukkit.Location attachmentPoint, BlockStateProvider foliageProvider, int radius) Generates a cascading blob 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 blob.foliageProvider- The block state provider for the leaf material.radius- The maximum horizontal radius of the blob.
-
getType
Retrieves the specific type definition for this foliage placer.- Specified by:
getTypein classFoliagePlacer- Returns:
- The foliage placer type associated with this instance.
-