Class RootPlacer
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.root.RootPlacer
- Direct Known Subclasses:
MangroveRootPlacer, SpreadingRootPlacer
The base class for all complex root generation algorithms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<RootPlacer> Polymorphic codec for serializing and deserializing any root placer implementation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract RootPlacerType<?> getType()Retrieves the specific type definition for this root placer.abstract org.bukkit.LocationplaceRoots(WorldGenAccess level, Random random, org.bukkit.Location origin, BlockStateProvider rootProvider, BlockStateProvider dirtProvider) Executes the root generation logic.
-
Field Details
-
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
Retrieves the specific type definition for this root placer.- Returns:
- The root placer type associated with this instance.
-