Class RedwoodTree

java.lang.Object
net.glowstone.generator.objects.trees.GenericTree
net.glowstone.generator.objects.trees.RedwoodTree
All Implemented Interfaces:
TerrainObject
Direct Known Subclasses:
TallRedwoodTree

public class RedwoodTree extends GenericTree
  • Field Details

    • maxRadius

      protected int maxRadius
    • leavesHeight

      protected int leavesHeight
  • Constructor Details

    • RedwoodTree

      public RedwoodTree(Random random, BlockStateDelegate delegate)
      Initializes this tree with a random height, preparing it to attempt to generate.
      Parameters:
      random - the PRNG
      delegate - the BlockStateDelegate used to check for space and to fill wood and
  • Method Details

    • setMaxRadius

      protected final void setMaxRadius(int maxRadius)
    • setLeavesHeight

      protected final void setLeavesHeight(int leavesHeight)
    • canPlace

      public boolean canPlace(int baseX, int baseY, int baseZ, org.bukkit.World world)
      Description copied from class: GenericTree
      Checks whether this tree has enough space to grow.
      Overrides:
      canPlace in class GenericTree
      Parameters:
      baseX - the X coordinate of the base of the trunk
      baseY - the Y coordinate of the base of the trunk
      baseZ - the Z coordinate of the base of the trunk
      world - the world to grow in
      Returns:
      true if this tree has space to grow; false otherwise
    • generate

      public boolean generate(org.bukkit.World world, Random random, int blockX, int blockY, int blockZ)
      Description copied from interface: TerrainObject
      Generates this feature.
      Specified by:
      generate in interface TerrainObject
      Overrides:
      generate in class GenericTree
      Parameters:
      world - the world to generate in
      random - the PRNG that will choose the size and a few details of the shape
      blockX - the base X coordinate
      blockY - the base Y coordinate
      blockZ - the base Z coordinate
      Returns:
      true if successfully generated