Class FoliagePlacer
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.foliage.FoliagePlacer
- Direct Known Subclasses:
AcaciaFoliagePlacer, BlobFoliagePlacer, DarkOakFoliagePlacer, PineFoliagePlacer, RandomSpreadFoliagePlacer
The base class for all tree foliage generation algorithms.
A FoliagePlacer is responsible for building the leaf canopy around specific attachment points generated by the associated TrunkPlacer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<FoliagePlacer> Polymorphic codec for serializing and deserializing any foliage placer implementation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract FoliagePlacerType<?> getType()Retrieves the specific type definition for this foliage placer.abstract voidplaceFoliage(WorldGenAccess level, Random random, org.bukkit.Location attachmentPoint, BlockStateProvider foliageProvider, int radius) Executes the foliage generation logic around a specific point.
-
Field Details
-
CODEC
Polymorphic codec for serializing and deserializing any foliage placer implementation.
-
-
Constructor Details
-
FoliagePlacer
public FoliagePlacer()
-
-
Method Details
-
placeFoliage
public abstract void placeFoliage(WorldGenAccess level, Random random, org.bukkit.Location attachmentPoint, BlockStateProvider foliageProvider, int radius) Executes the foliage generation logic around a specific point.- Parameters:
level- The world generation accessor.random- The deterministic random source.attachmentPoint- The central location to build the canopy around.foliageProvider- The block state provider for the leaf material.radius- The calculated horizontal radius for this specific foliage layer.
-
getType
Retrieves the specific type definition for this foliage placer.- Returns:
- The foliage placer type associated with this instance.
-