mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-08 00:36:15 +00:00
Fix up issues with code
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user