use correct y value in LazilyEvaluatedInterpolator

This commit is contained in:
dfsek
2022-06-16 17:21:46 -07:00
parent 34b1aca556
commit baccd04c8d
@@ -44,15 +44,15 @@ public class LazilyEvaluatedInterpolator {
this.min = min; this.min = min;
} }
private double sample(int x, int y, int z, int ox, int oy, int oz) { private double sample(int xIndex, int yIndex, int zIndex, int ox, int oy, int oz) {
int index = x + (z * zMul) + (y * yMul); int index = xIndex + (zIndex * zMul) + (yIndex * yMul);
Double sample = samples[index]; Double sample = samples[index];
if(sample == null) { if(sample == null) {
int xi = ox + chunkX; int xi = ox + chunkX;
int zi = oz + chunkZ; int zi = oz + chunkZ;
sample = biomeProvider sample = biomeProvider
.getBiome(xi, y, zi, seed) .getBiome(xi, oy, zi, seed)
.getContext() .getContext()
.get(noisePropertiesKey) .get(noisePropertiesKey)
.carving() .carving()