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

@@ -21,15 +21,15 @@ public class NoiseFunction2 implements Function {
return cache.get(list.get(0).evaluate(), list.get(1).evaluate());
}
public void setNoise(FastNoiseLite gen) {
this.gen = gen;
}
@Override
public boolean isNaturalFunction() {
return true;
}
public void setNoise(FastNoiseLite gen) {
this.gen = gen;
}
private final class Cache {
private final double[] cacheX = new double[ConfigUtil.cacheSize];
private final double[] cacheZ = new double[ConfigUtil.cacheSize];
@@ -37,7 +37,7 @@ public class NoiseFunction2 implements Function {
public double get(double x, double z) {
for(int i = 0; i < cacheX.length; i++) {
if(cacheX[i] == x && cacheZ[i] == z) return cacheValues[i];
if (cacheX[i] == x && cacheZ[i] == z) return cacheValues[i];
}
cacheX[0] = x;
cacheZ[0] = z;

View File

@@ -19,12 +19,12 @@ public class NoiseFunction3 implements Function {
return gen.getNoise(list.get(0).evaluate(), list.get(1).evaluate(), list.get(2).evaluate());
}
public void setNoise(FastNoiseLite gen) {
this.gen = gen;
}
@Override
public boolean isNaturalFunction() {
return true;
}
public void setNoise(FastNoiseLite gen) {
this.gen = gen;
}
}