generateLeaves(w, (int) (x + (randomOffset.getX() * 4f + 0.5f)), y + yy, (int) (z + (randomOffset.getY() * 4f + 0.5f)), (byte) 0);
for (byte branchLengthCount = 0; branchLengthCount < branchLength; branchLengthCount++) {
final int bx = (int) (randomOffset.getX() * branchLengthCount + 1.5f);
final int by = -3 + branchLengthCount / 2;
final int bz = (int) (randomOffset.getY() * branchLengthCount + 1.5f);
final Block block = w.getBlock(x + bx, y + yy + by, z + bz);
block.setMaterial(VanillaMaterials.LOG);
block.setData(logMetadata);
VanillaMaterials.LOG.setFacing(block, BlockFace.fromYaw(MathHelper.getLookAtYaw(new Vector3f(bx, by, bz))));
}
}
for (byte yy = -1; yy < totalHeight - 1; yy++) {
for (byte xx = 0; xx < 2; xx++) {