Fixed tree trunks

This commit is contained in:
Matt Caughey 2013-09-28 06:51:39 -04:00
parent cbf3a77863
commit ac220d1f89
1 changed files with 33 additions and 23 deletions

View File

@ -324,29 +324,39 @@ public class WorldGenMassiveTree extends WorldGenerator
* Places the trunk for the big tree that is being generated. Able to generate double-sized trunks by changing a * 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. * field that is always 1 to 2.
*/ */
void generateTrunk()
{
int var1 = basePos[0];
int var2 = basePos[1];
int var3 = basePos[1] + height;
int var4 = basePos[2];
int[] var5 = new int[] {var1, var2, var4};
int[] var6 = new int[] {var1, var3, var4};
this.placeBlockLine(var5, var6, Block.wood.blockID);
if (trunkSize == 2)
{ void generateTrunk()
++var5[0]; {
++var6[0]; int var1 = basePos[0];
this.placeBlockLine(var5, var6, Block.wood.blockID); int var2 = basePos[1];
++var5[2]; int var3 = basePos[1] + height;
++var6[2]; int var4 = basePos[2];
this.placeBlockLine(var5, var6, Block.wood.blockID);
var5[0] += -1; int[] var5 = new int[] {var1, var2, var4};
var6[0] += -1; int[] var6 = new int[] {var1, var3, var4};
this.placeBlockLine(var5, var6, Block.wood.blockID);
} if (trunkSize == 2)
} {
for (int i = -2; i < 3; i++ )
{
var5[0] = var1 + i;
var6[0] = var1 + i;
for (int j = -2; j < 3; j++ )
{
if ((i != -2 && j != -2) || (i != -2 && j != 2) || (i != 2 && j != -2) || (i != 2 && j != 2))
{
var5[2] = var4 + j;
var6[2] = var4 + j;
this.placeBlockLine(var5, var6, Block.wood.blockID);
}
}
}
}
}
/** /**
* Generates additional wood blocks to fill out the bases of different leaf nodes that would otherwise degrade. * Generates additional wood blocks to fill out the bases of different leaf nodes that would otherwise degrade.
@ -487,7 +497,7 @@ public class WorldGenMassiveTree extends WorldGenerator
if (heightLimit == 0) if (heightLimit == 0)
{ {
heightLimit = 30 + par2Random.nextInt(30); heightLimit = 50;
} }
if (!this.validTreeLocation()) if (!this.validTreeLocation())