Fixed holes in trees
This commit is contained in:
parent
491d5f0478
commit
858a7c8378
2 changed files with 14 additions and 2 deletions
|
@ -10,7 +10,8 @@ public class BiomeAmberLand extends EndBiome {
|
|||
super(new BiomeDefinition("amber_land")
|
||||
.setFogColor(255, 184, 71)
|
||||
.setFogDensity(2.0F)
|
||||
.setPlantsColor(122, 45, 122)
|
||||
.setPlantsColor(219, 115, 38)
|
||||
.setWaterAndFogColor(145, 108, 72)
|
||||
.setSurface(EndBlocks.AMBER_MOSS)
|
||||
.addFeature(EndFeatures.AMBER_ORE)
|
||||
.addFeature(EndFeatures.END_LAKE_RARE)
|
||||
|
|
|
@ -95,13 +95,24 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
int minY = MHelper.floor(lastPoint.getY());
|
||||
int maxY = MHelper.floor(point.getY());
|
||||
float div = point.getY() - lastPoint.getY();
|
||||
for (float py = minY; py <= maxY; py += 0.1F) {
|
||||
for (float py = minY; py <= maxY; py += 0.2F) {
|
||||
start.set(0, py, 0);
|
||||
float delta = (float) (py - minY) / div;
|
||||
float px = MathHelper.lerp(delta, lastPoint.getX(), point.getX());
|
||||
float pz = MathHelper.lerp(delta, lastPoint.getZ(), point.getZ());
|
||||
end.set(px, py, pz);
|
||||
fillLine(start, end, world, leaf, leafStart, i / 2 - 1);
|
||||
float ax = Math.abs(px);
|
||||
float az = Math.abs(pz);
|
||||
if (ax > az) {
|
||||
start.add(0, 0, az > 0 ? 1 : -1);
|
||||
end.add(0, 0, az > 0 ? 1 : -1);
|
||||
}
|
||||
else {
|
||||
start.add(ax > 0 ? 1 : -1, 0, 0);
|
||||
end.add(ax > 0 ? 1 : -1, 0, 0);
|
||||
}
|
||||
fillLine(start, end, world, leaf, leafStart, i / 2 - 1);
|
||||
}
|
||||
lastPoint = point;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue