Rework cave shader - make default proportional for variable world height

This commit is contained in:
Michael Primm 2023-03-23 13:27:33 -05:00
parent 76649c6250
commit ab900740b7
7 changed files with 70 additions and 29 deletions

View file

@ -109,6 +109,7 @@ public class ForgeMapChunkCache extends MapChunkCache
private BlockStep laststep;
private DynmapBlockState blk;
private final int worldheight;
private final int ymin, sealevel;
private final int x_base;
private final int z_base;
@ -124,6 +125,8 @@ public class ForgeMapChunkCache extends MapChunkCache
initialize(x0, y0, z0);
worldheight = w.getHeight();
ymin = 0;
sealevel = w.getSeaLevel();
}
@Override
public final void initialize(int x0, int y0, int z0)
@ -719,6 +722,14 @@ public class ForgeMapChunkCache extends MapChunkCache
return worldheight;
}
@Override
public int getWorldYMin() {
return ymin;
}
@Override
public int getWorldSeaLevel() {
return sealevel;
}
@Override
public long getBlockKey()
{
return (((chunkindex * worldheight) + y) << 8) | (bx << 4) | bz;