Class TreeDecorator
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.decorator.TreeDecorator
- Direct Known Subclasses:
AlterGroundDecorator, BeeNestDecorator, CocoaBeanDecorator, LeaveVineDecorator, TrunkVineDecorator
The base class for all tree decoration algorithms.
Decorators are the final step in the tree generation pipeline. They receive the exact coordinates of all logs and leaves placed by the placers, allowing them to accurately drape vines, place beehives, or alter the surrounding ground.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<TreeDecorator> Polymorphic codec for serializing and deserializing any tree decorator implementation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddecorate(WorldGenAccess level, Random random, Set<org.bukkit.Location> logs, Set<org.bukkit.Location> leaves) Executes the decoration logic upon the fully generated tree.abstract TreeDecoratorType<?> getType()Retrieves the specific type definition for this decorator.
-
Field Details
-
CODEC
Polymorphic codec for serializing and deserializing any tree decorator implementation.
-
-
Constructor Details
-
TreeDecorator
public TreeDecorator()
-
-
Method Details
-
decorate
public abstract void decorate(WorldGenAccess level, Random random, Set<org.bukkit.Location> logs, Set<org.bukkit.Location> leaves) Executes the decoration logic upon the fully generated tree.- Parameters:
level- The world generation accessor.random- The deterministic random source.logs- The set of absolute coordinates where trunk blocks were placed.leaves- The set of absolute coordinates where foliage blocks were placed.
-
getType
Retrieves the specific type definition for this decorator.- Returns:
- The tree decorator type associated with this instance.
-