Height fixes

This commit is contained in:
Daniel Mills 2020-10-25 12:30:05 -04:00
parent 49b494ed02
commit 9f3e5fea38
3 changed files with 18 additions and 2 deletions

View File

@ -340,6 +340,11 @@ public abstract class TopographicTerrainProvider extends ParallelTerrainProvider
} }
} }
if(Math.max(height, fluidHeight) > 255)
{
return height;
}
block = sliver.get(Math.max(height, fluidHeight)); block = sliver.get(Math.max(height, fluidHeight));
// Decorate True Surface // Decorate True Surface

View File

@ -87,7 +87,18 @@ public class AtomicSliver
{ {
return null; return null;
} }
FastBlockData b = block[h < 256 ? h : 256];
if(h > 255)
{
h = 255;
}
if(h < 0)
{
h = 0;
}
FastBlockData b = block[h];
last = M.ms(); last = M.ms();
if(b == null) if(b == null)

View File

@ -27,7 +27,7 @@ public class IrisTerrainGenerator
{ {
complex.flash(seed, dimension, data); complex.flash(seed, dimension, data);
} }
public void generate(int x, int z, Hunk<BlockData> blocks, Hunk<Biome> biomes) public void generate(int x, int z, Hunk<BlockData> blocks, Hunk<Biome> biomes)
{ {
// RNG rng = new RNG((((long) x) << 32) | (z & 0xffffffffL)); // RNG rng = new RNG((((long) x) << 32) | (z & 0xffffffffL));