Some localization and refactoring

Move binnie.extratrees.gen classes to binnie.extratrees.worldgen package
Drop binnie.extratrees.gen package
This commit is contained in:
kordum committed 2017-05-11 18:38:40 +03:00
1 parent 0d8c5b9230
commit 47cca224df
47 files changed
+643 -555

No files matched your search

@@ -0,0 +1,39 @@
package binnie.extratrees.worldgen;
import forestry.api.world.ITreeGenData;
public class WorldGenAsh {
public static class CommonAsh extends WorldGenTree {
public CommonAsh(ITreeGenData tree) {
super(tree);
}
@Override
public void generate() {
generateTreeTrunk(height, girth);
float leafSpawn = height + 1;
float bottom = randBetween(2, 3);
float width = height * randBetween(0.35f, 0.45f);
float f = 0.0f;
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(f, h, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn > bottom) {
float f2 = 0.0f;
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(f2, h2, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
}
float f3 = 0.0f;
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(f3, h3, 0.0f), 0.7f * width, 1, leaf, false);
}
@Override
public void preGenerate() {
height = determineHeight(5, 2);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
}
}