Rework cave shader - make default proportional for variable world height
This commit is contained in:
parent
1fbc54ecdc
commit
7d7fadd4be
7 changed files with 70 additions and 29 deletions
|
|
@ -97,6 +97,7 @@ public abstract class AbstractMapChunkCache extends MapChunkCache {
|
|||
private DynmapBlockState type = null;
|
||||
private final int worldheight;
|
||||
private final int ymin;
|
||||
private final int sealevel;
|
||||
private final int x_base;
|
||||
private final int z_base;
|
||||
|
||||
|
|
@ -108,6 +109,7 @@ public abstract class AbstractMapChunkCache extends MapChunkCache {
|
|||
initialize(x0, y0, z0);
|
||||
worldheight = w.getMaxHeight();
|
||||
ymin = dw.minY;
|
||||
sealevel = dw.sealevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -587,6 +589,14 @@ public abstract class AbstractMapChunkCache extends MapChunkCache {
|
|||
return worldheight;
|
||||
}
|
||||
@Override
|
||||
public int getWorldYMin() {
|
||||
return ymin;
|
||||
}
|
||||
@Override
|
||||
public int getWorldSeaLevel() {
|
||||
return sealevel;
|
||||
}
|
||||
@Override
|
||||
public long getBlockKey() {
|
||||
return (((chunkindex * (worldheight - ymin)) + (y - ymin)) << 8) | (bx << 4) | bz;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue