Class RootPlacer

java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.root.RootPlacer
Direct Known Subclasses:
MangroveRootPlacer, SpreadingRootPlacer

public abstract class RootPlacer extends Object
The base class for all complex root generation algorithms.
  • Field Details

    • CODEC

      public static final Codec<RootPlacer> CODEC
      Polymorphic codec for serializing and deserializing any root placer implementation.
  • Constructor Details

    • RootPlacer

      public RootPlacer()
  • Method Details

    • placeRoots

      public abstract org.bukkit.Location placeRoots(WorldGenAccess level, Random random, org.bukkit.Location origin, BlockStateProvider rootProvider, BlockStateProvider dirtProvider)
      Executes the root generation logic.
      Parameters:
      level - The world generation accessor.
      random - The deterministic random source.
      origin - The requested base location of the tree.
      rootProvider - The provider defining the material of the roots.
      dirtProvider - The provider to optionally enforce the ground beneath the roots.
      Returns:
      The new, adjusted origin location where the TrunkPlacer should begin.
    • getType

      public abstract RootPlacerType<?> getType()
      Retrieves the specific type definition for this root placer.
      Returns:
      The root placer type associated with this instance.