Class GiantTrunkPlacer
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.tree.trunk.TrunkPlacer
com.github.darksoulq.abyssallib.world.gen.feature.tree.trunk.GiantTrunkPlacer
A trunk placer that generates a massive 2x2 vertical column of blocks.
This algorithm calculates four parallel columns, originating from the base coordinate and expanding positive X and positive Z. It returns four distinct attachment points, ensuring that associated foliage placers render a massive, seamlessly merged canopy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<GiantTrunkPlacer> The codec used for serializing and deserializing the giant trunk placer.static final TrunkPlacerType<GiantTrunkPlacer> The registered type definition for the giant 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 2x2 vertical column of blocks up to the specified height.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the giant trunk placer. This placer has no configurable variables, so it encodes to an empty map. -
TYPE
The registered type definition for the giant trunk placer.
-
-
Constructor Details
-
GiantTrunkPlacer
public GiantTrunkPlacer()Constructs a new GiantTrunkPlacer.
-
-
Method Details
-
placeTrunk
public List<org.bukkit.util.Vector> placeTrunk(WorldGenAccess level, Random random, org.bukkit.Location origin, BlockStateProvider trunkProvider, int height) Places a 2x2 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 (the north-west corner of the 2x2 trunk).trunkProvider- The block state provider for the trunk material.height- The calculated total height for this specific tree instance.- Returns:
- A list containing the four attachment vectors 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.
-