Class StraightTrunkPlacer
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.trunk.TrunkPlacer
com.github.darksoulq.abyssallib.world.gen.feature.tree.trunk.StraightTrunkPlacer
A standard trunk placer that generates a straight vertical column of blocks.
This is used for basic trees like Oak, Birch, or Spruce. It returns a single foliage attachment point located at the very top of the generated trunk.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<StraightTrunkPlacer> The codec used for serializing and deserializing the straight trunk placer.static final TrunkPlacerType<StraightTrunkPlacer> The registered type definition for the straight trunk placer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()Retrieves the specific type definition for this trunk placer.List<org.bukkit.util.Vector> placeTrunk(WorldGenAccess level, Random random, org.bukkit.Location origin, BlockStateProvider trunkProvider, int height) Places a vertical column of blocks up to the specified height.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the straight trunk placer. This placer has no configurable variables, so it encodes to an empty map. -
TYPE
The registered type definition for the straight trunk placer.
-
-
Constructor Details
-
StraightTrunkPlacer
public StraightTrunkPlacer()Constructs a new StraightTrunkPlacer.
-
-
Method Details
-
placeTrunk
public List<org.bukkit.util.Vector> placeTrunk(WorldGenAccess level, Random random, org.bukkit.Location origin, BlockStateProvider trunkProvider, int height) Places a vertical column of blocks up to the specified height.- Specified by:
placeTrunkin classTrunkPlacer- Parameters:
level- The world generation accessor.random- The deterministic random source.origin- The base starting location of the tree.trunkProvider- The block state provider for the trunk material.height- The calculated total height for this specific tree instance.- Returns:
- A list containing the single attachment vector at the top of the trunk.
-
getType
Retrieves the specific type definition for this trunk placer.- Specified by:
getTypein classTrunkPlacer- Returns:
- The trunk placer type associated with this instance.
-