Package net.minecraft.src
Class WorldGenBigTree
java.lang.Object
net.minecraft.src.WorldGenerator
net.minecraft.src.WorldGenBigTree
- Direct Known Subclasses:
BigTreeGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionint[]doubledoubleintdoubleintintSets the limit of the random value used to initialize the height limit.doubleintSets 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 GenBigTreedoubleintCurrently 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 -
Method Summary
Modifier and TypeMethodDescriptionintcheckBlockLine(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.booleanvoidgenerateLeafNode(int par1, int par2, int par3) Generates the leaves surrounding an individual entry in the leafNodes list.voidGenerates additional wood blocks to fill out the bases of different leaf nodes that would otherwise degrade.voidGenerates a list of leaf nodes for the tree, to be populated by generateLeaves.voidGenerates the leaf portion of the tree as specified by the leafNodes list.voidPlaces the trunk for the big tree that is being generated.voidgenTreeLayer(int par1, int par2, int par3, float par4, byte par5, int par6) floatlayerSize(int par1) Gets the rough size of a layer of the tree.booleanleafNodeNeedsBase(int par1) Indicates whether or not a leaf node requires additional wood to be added to preserve integrity.floatleafSize(int par1) voidplaceBlockLine(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.voidsetScale(double par1, double par3, double par5) Rescales the generator settings, only used in WorldGenBigTreebooleanReturns 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
-
Field Details
-
otherCoordPairs
public static final byte[] otherCoordPairsContains 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
random seed for GenBigTree -
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 trunkSizeCurrently always 1, can be set to 2 in the class constructor to generate a double-sized tree trunk for big trees. -
heightLimitLimit
public int heightLimitLimitSets the limit of the random value used to initialize the height limit. -
leafDistanceLimit
public int leafDistanceLimitSets the distance limit for how far away the generator will populate leaves from the base leaf node. -
leafNodes
public int[][] leafNodesContains 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:
setScalein classWorldGenerator
-
generate
- Specified by:
generatein classWorldGenerator
-