Class TreeDecorator

java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.decorator.TreeDecorator
Direct Known Subclasses:
AlterGroundDecorator, BeeNestDecorator, CocoaBeanDecorator, LeaveVineDecorator, TrunkVineDecorator

public abstract class TreeDecorator extends Object
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 Details

    • CODEC

      public static final Codec<TreeDecorator> 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

      public abstract TreeDecoratorType<?> getType()
      Retrieves the specific type definition for this decorator.
      Returns:
      The tree decorator type associated with this instance.