mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
use y-level in ChunkInterpolator
This commit is contained in:
+6
-7
@@ -7,15 +7,15 @@
|
|||||||
|
|
||||||
package com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation;
|
package com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation;
|
||||||
|
|
||||||
|
import com.dfsek.terra.addons.chunkgenerator.config.noise.BiomeNoiseProperties;
|
||||||
|
import com.dfsek.terra.api.util.mutable.MutableInteger;
|
||||||
|
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||||
|
|
||||||
import net.jafama.FastMath;
|
import net.jafama.FastMath;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.dfsek.terra.addons.chunkgenerator.config.noise.BiomeNoiseProperties;
|
|
||||||
import com.dfsek.terra.api.util.mutable.MutableInteger;
|
|
||||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to abstract away the Interpolators needed to generate a chunk.<br>
|
* Class to abstract away the Interpolators needed to generate a chunk.<br>
|
||||||
@@ -55,7 +55,8 @@ public class ChunkInterpolator {
|
|||||||
|
|
||||||
for(int x = 0; x < 5; x++) {
|
for(int x = 0; x < 5; x++) {
|
||||||
for(int z = 0; z < 5; z++) {
|
for(int z = 0; z < 5; z++) {
|
||||||
BiomeNoiseProperties generationSettings = provider.getBiome(xOrigin + (x << 2), 0, zOrigin + (z << 2), seed)
|
for(int y = 0; y < size + 1; y++) {
|
||||||
|
BiomeNoiseProperties generationSettings = provider.getBiome(xOrigin + (x << 2), (y << 2) + min, zOrigin + (z << 2), seed)
|
||||||
.getContext()
|
.getContext()
|
||||||
.get(BiomeNoiseProperties.class);
|
.get(BiomeNoiseProperties.class);
|
||||||
Map<BiomeNoiseProperties, MutableInteger> genMap = new HashMap<>();
|
Map<BiomeNoiseProperties, MutableInteger> genMap = new HashMap<>();
|
||||||
@@ -72,8 +73,6 @@ public class ChunkInterpolator {
|
|||||||
g -> new MutableInteger(0)).increment(); // Increment by 1
|
g -> new MutableInteger(0)).increment(); // Increment by 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int y = 0; y < size + 1; y++) {
|
|
||||||
noiseStorage[x][z][y] = computeNoise(genMap, (x << 2) + xOrigin, (y << 2) + this.min, (z << 2) + zOrigin);
|
noiseStorage[x][z][y] = computeNoise(genMap, (x << 2) + xOrigin, (y << 2) + this.min, (z << 2) + zOrigin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user