Class WorldGenBigTree

java.lang.Object
net.minecraft.src.WorldGenerator
net.minecraft.src.WorldGenBigTree
Direct Known Subclasses:
BigTreeGenerator

public class WorldGenBigTree extends WorldGenerator
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int[]
     
    double
     
    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.
  • Constructor Summary

    Constructors
    Constructor
    Description
    WorldGenBigTree(boolean par1)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    boolean
    generate(World par1World, Random par2Random, int par3, int par4, int par5)
     
    void
    generateLeafNode(int par1, int par2, int par3)
    Generates the leaves surrounding an individual entry in the leafNodes list.
    void
    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
    Generates the leaf portion of the tree as specified by the leafNodes list.
    void
    Places the trunk for the big tree that is being generated.
    void
    genTreeLayer(int par1, int par2, int par3, float par4, byte par5, int par6)
     
    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 par3)
    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
    boolean
    Returns a boolean indicating whether or not the current location for the tree, spanning basePos to to the height limit, is valid.

    Methods inherited from class net.minecraft.src.WorldGenerator

    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
    • branchDensity

      public double branchDensity
    • 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

    • WorldGenBigTree

      public WorldGenBigTree(boolean par1)
  • Method Details

    • 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 par6)
    • 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)
      Generates the leaves surrounding an individual entry in the leafNodes list.
    • placeBlockLine

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

      public void generateLeaves()
      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()
      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()
      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.
    • validTreeLocation

      public boolean validTreeLocation()
      Returns a boolean indicating whether or not the current location for the tree, spanning basePos to to the height limit, is valid.
    • setScale

      public void setScale(double par1, double par3, double par5)
      Rescales the generator settings, only used in WorldGenBigTree
      Overrides:
      setScale in class WorldGenerator
    • generate

      public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
      Specified by:
      generate in class WorldGenerator