Fix up issues with code

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
solonovamax
2020-11-06 22:26:57 -05:00
parent a362ed47ce
commit 0c8c0723ef
130 changed files with 1228 additions and 1059 deletions

View File

@@ -9,6 +9,7 @@ import org.polydev.gaea.world.carving.Worm;
import java.util.Random;
@SuppressWarnings("unused")
public class SimplexCarver extends Carver {
private final FastNoiseLite noise;
private final FastNoiseLite height;
@@ -39,20 +40,6 @@ public class SimplexCarver extends Carver {
hasCaves.setFrequency(0.005f);
}
private static double acot(double x) {
return Math.PI / 2 - Math.atan(x);
}
@Override
public Worm getWorm(long l, Vector vector) {
return null;
}
@Override
public boolean isChunkCarved(World world, int i, int i1, Random random) {
return true;
}
@Override
public CarvingData carve(int chunkX, int chunkZ, World w) {
CarvingData c = new CarvingData(chunkX, chunkZ);
@@ -71,7 +58,7 @@ public class SimplexCarver extends Carver {
if(finalNoise > 0.5) {
c.carve(x - ox, y, z - oz, type);
double finalNoiseUp = (-0.05 * Math.abs((y + 1) - (heightNoise * 16 + 24)) + 1 - simplex) * hc;
if(finalNoiseUp > 0.5) {
if (finalNoiseUp > 0.5) {
type = CarvingData.CarvingType.CENTER;
} else type = CarvingData.CarvingType.TOP;
}
@@ -80,4 +67,18 @@ public class SimplexCarver extends Carver {
}
return c;
}
private static double acot(double x) {
return Math.PI / 2 - Math.atan(x);
}
@Override
public Worm getWorm(long l, Vector vector) {
return null;
}
@Override
public boolean isChunkCarved(World world, int i, int i1, Random random) {
return true;
}
}