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

public class GiantTrunkPlacer extends TrunkPlacer
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 Details

    • CODEC

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

      public static final TrunkPlacerType<GiantTrunkPlacer> 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:
      placeTrunk in class TrunkPlacer
      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

      public TrunkPlacerType<?> getType()
      Retrieves the specific type definition for this trunk placer.
      Specified by:
      getType in class TrunkPlacer
      Returns:
      The trunk placer type associated with this instance.