Class BigTreeGrower

java.lang.Object
api.world.feature.AbstractTreeGrower
btw.world.feature.trees.grower.BigTreeGrower

public class BigTreeGrower extends AbstractTreeGrower
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int[]
     
    double
     
    int
     
    double
     
    int
     
    int
    Sets the limit of the random value used to initialize the height limit.
    double
     
    int
    Sets the distance limit for how far away the generator will populate leaves from the base leaf node.
    int[][]
    Contains a list of a points at which to generate groups of leaves.
    static final byte[]
    Contains three sets of two values that provide complimentary indices for a given 'major' index - 1 and 2 for 0, 0 and 2 for 1, and 0 and 1 for 2.
    random seed for GenBigTree
    double
     
    int
    Currently always 1, can be set to 2 in the class constructor to generate a double-sized tree trunk for big trees.
    Reference to the World object.

    Fields inherited from class api.world.feature.AbstractTreeGrower

    maxTreeHeight, minTreeHeight, name, woodType
  • Constructor Summary

    Constructors
    Constructor
    Description
    BigTreeGrower(String name, int minTreeHeight, int maxTreeHeight, TreeGrowers.TreeWoodType woodType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    int
    checkBlockLine(int[] par1ArrayOfInteger, int[] par2ArrayOfInteger)
    Checks a line of blocks in the world from the first coordinate to triplet to the second, returning the distance (in blocks) before a non-air, non-leaf block is encountered and/or the end is encountered.
    void
    generateLeafNode(int par1, int par2, int par3, boolean isWorldGen)
    Generates the leaves surrounding an individual entry in the leafNodes list.
    void
    generateLeafNodeBases(boolean isWorldGen)
    Generates additional wood blocks to fill out the bases of different leaf nodes that would otherwise degrade.
    void
    Generates a list of leaf nodes for the tree, to be populated by generateLeaves.
    void
    generateLeaves(boolean isWorldGen)
    Generates the leaf portion of the tree as specified by the leafNodes list.
    void
    generateTrunk(boolean isWorldGen)
    Places the trunk for the big tree that is being generated.
    void
    genTreeLayer(int par1, int par2, int par3, float par4, byte par5, int blockID, int metadata, boolean isWorldGen)
     
    boolean
    growTree(World world, Random rand, int x, int y, int z, boolean isWorldGen)
     
    float
    layerSize(int par1)
    Gets the rough size of a layer of the tree.
    boolean
    Indicates whether or not a leaf node requires additional wood to be added to preserve integrity.
    float
    leafSize(int par1)
     
    void
    placeBlockLine(int[] par1ArrayOfInteger, int[] par2ArrayOfInteger, int blockID, int metadata, boolean isWorldGen)
    Places a line of the specified block ID into the world from the first coordinate triplet to the second.
    void
    setScale(double par1, double par3, double par5)
    Rescales the generator settings, only used in WorldGenBigTree

    Methods inherited from class api.world.feature.AbstractTreeGrower

    isLogReplaceable, isReplaceable, setBlock, setBlockAndMetadata

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • otherCoordPairs

      public static final byte[] otherCoordPairs
      Contains three sets of two values that provide complimentary indices for a given 'major' index - 1 and 2 for 0, 0 and 2 for 1, and 0 and 1 for 2.
    • rand

      public Random rand
      random seed for GenBigTree
    • worldObj

      public World worldObj
      Reference to the World object.
    • basePos

      public int[] basePos
    • heightLimit

      public int heightLimit
    • height

      public int height
    • heightAttenuation

      public double heightAttenuation
    • branchSlope

      public double branchSlope
    • scaleWidth

      public double scaleWidth
    • leafDensity

      public double leafDensity
    • trunkSize

      public int trunkSize
      Currently always 1, can be set to 2 in the class constructor to generate a double-sized tree trunk for big trees.
    • heightLimitLimit

      public int heightLimitLimit
      Sets the limit of the random value used to initialize the height limit.
    • leafDistanceLimit

      public int leafDistanceLimit
      Sets the distance limit for how far away the generator will populate leaves from the base leaf node.
    • leafNodes

      public int[][] leafNodes
      Contains a list of a points at which to generate groups of leaves.
  • Constructor Details

  • Method Details

    • growTree

      public boolean growTree(World world, Random rand, int x, int y, int z, boolean isWorldGen)
      Specified by:
      growTree in class AbstractTreeGrower
    • canTreeGrowHere

      protected boolean canTreeGrowHere()
    • generateLeafNodeList

      public void generateLeafNodeList()
      Generates a list of leaf nodes for the tree, to be populated by generateLeaves.
    • genTreeLayer

      public void genTreeLayer(int par1, int par2, int par3, float par4, byte par5, int blockID, int metadata, boolean isWorldGen)
    • layerSize

      public float layerSize(int par1)
      Gets the rough size of a layer of the tree.
    • leafSize

      public float leafSize(int par1)
    • generateLeafNode

      public void generateLeafNode(int par1, int par2, int par3, boolean isWorldGen)
      Generates the leaves surrounding an individual entry in the leafNodes list.
    • placeBlockLine

      public void placeBlockLine(int[] par1ArrayOfInteger, int[] par2ArrayOfInteger, int blockID, int metadata, boolean isWorldGen)
      Places a line of the specified block ID into the world from the first coordinate triplet to the second.
    • generateLeaves

      public void generateLeaves(boolean isWorldGen)
      Generates the leaf portion of the tree as specified by the leafNodes list.
    • leafNodeNeedsBase

      public boolean leafNodeNeedsBase(int par1)
      Indicates whether or not a leaf node requires additional wood to be added to preserve integrity.
    • generateTrunk

      public void generateTrunk(boolean isWorldGen)
      Places the trunk for the big tree that is being generated. Able to generate double-sized trunks by changing a field that is always 1 to 2.
    • generateLeafNodeBases

      public void generateLeafNodeBases(boolean isWorldGen)
      Generates additional wood blocks to fill out the bases of different leaf nodes that would otherwise degrade.
    • checkBlockLine

      public int checkBlockLine(int[] par1ArrayOfInteger, int[] par2ArrayOfInteger)
      Checks a line of blocks in the world from the first coordinate to triplet to the second, returning the distance (in blocks) before a non-air, non-leaf block is encountered and/or the end is encountered.
    • setScale

      public void setScale(double par1, double par3, double par5)
      Rescales the generator settings, only used in WorldGenBigTree