Fix decaying shrub leaves Fix #165 (#171)

This commit is contained in:
Alexander Kornilov authored and mezz committed 2017-07-05 22:16:46 -07:00
1 parent ec790c9333
commit 5846f59d64
8 files changed
+37 -27

No files matched your search

@@ -15,18 +15,10 @@ public class WorldGenShrub extends WorldGenTree {
width = 1.5f;
}
float h = leafSpawn;
leafSpawn = h - 1.0f;
generateCylinder(new Vector(0.0f, h, 0.0f), 0.4f * width, 1, leaf, false);
float h2 = leafSpawn;
leafSpawn = h2 - 1.0f;
generateCylinder(new Vector(0.0f, h2, 0.0f), 0.8f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
while (leafSpawn >= 0.0f) {
float h3 = leafSpawn;
leafSpawn = h3 - 1.0f;
generateCylinder(new Vector(0.0f, h3, 0.0f), width, 1, leaf, false);
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
}
}
@@ -36,4 +28,9 @@ public class WorldGenShrub extends WorldGenTree {
height = determineHeight(1, 1);
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
}
@Override
public BlockType getLeaf() {
return new BlockTypeLeaf(false);
}
}