rename ILevelWrapper.getHeight -> getMaxHeight

This commit is contained in:
James Seibel
2024-07-07 18:16:00 -05:00
parent c73c3f8490
commit bacdfa96e3
8 changed files with 8 additions and 9 deletions
@@ -42,7 +42,7 @@ public interface IDhApiLevelWrapper extends IDhApiUnsafeWrapper
boolean hasSkyLight();
/** Returns the max block height of the level(?) */
int getHeight();
int getMaxHeight();
/**
* Returns the lowest possible block position for the level. <br>
@@ -322,7 +322,7 @@ public class DhApiTerrainDataRepo implements IDhApiTerrainDataRepo
rayDirection.normalize();
int minBlockHeight = levelWrapper.getMinHeight();
int maxBlockHeight = levelWrapper.getHeight();
int maxBlockHeight = levelWrapper.getMaxHeight();
@@ -244,7 +244,7 @@ public class RenderBufferHandler implements AutoCloseable
if (enableFrustumCulling)
{
int worldMinY = clientLevelWrapper.getMinHeight();
int worldHeight = clientLevelWrapper.getHeight();
int worldHeight = clientLevelWrapper.getMaxHeight();
Vec3d cameraPos = MC_RENDER.getCameraExactPosition();
@@ -217,7 +217,7 @@ public class CloudRenderHandler
boxGroup.setOriginBlockPos(
new DhApiVec3f(
clouds.xOffset + (clouds.instanceOffsetX * clouds.widthInBlocks) + xOffset + clouds.halfWidthInBlocks,
this.level.getLevelWrapper().getHeight() + 200,
this.level.getLevelWrapper().getMaxHeight() + 200,
clouds.zOffset + (clouds.instanceOffsetZ * clouds.widthInBlocks) + zOffset + clouds.halfWidthInBlocks
)
);
@@ -116,7 +116,7 @@ public class FogShader extends AbstractShaderRenderer
if (this.nearFogStartUniform != -1) this.shader.setUniform(this.nearFogStartUniform, nearFogStart);
if (this.nearFogLengthUniform != -1) this.shader.setUniform(this.nearFogLengthUniform, nearFogLen);
if (this.fogScaleUniform != -1) this.shader.setUniform(this.fogScaleUniform, 1.f / lodDrawDistance);
if (this.fogVerticalScaleUniform != -1) this.shader.setUniform(this.fogVerticalScaleUniform, 1.f / MC.getWrappedClientLevel().getHeight());
if (this.fogVerticalScaleUniform != -1) this.shader.setUniform(this.fogVerticalScaleUniform, 1.f / MC.getWrappedClientLevel().getMaxHeight());
}
private Color getFogColor(float partialTicks)
@@ -244,7 +244,7 @@ public class RenderUtil
// if the player is a significant distance above the work, increase the
// near clip plane to fix Z imprecision issues
int playerHeight = MC.getPlayerBlockPos().y;
int levelMaxHeight = level.getHeight();
int levelMaxHeight = level.getMaxHeight();
if (playerHeight > levelMaxHeight + 1_000)
{
return playerHeight - (levelMaxHeight + 1000);
@@ -47,8 +47,7 @@ public interface ILevelWrapper extends IDhApiLevelWrapper, IBindable
boolean hasSkyLight();
@Override
int getHeight();
int getMaxHeight();
@Override
default int getMinHeight() { return 0; }
@@ -48,7 +48,7 @@ public class LevelWrapperTest implements IDhApiLevelWrapper
public boolean hasSkyLight() { return false; }
@Override
public int getHeight() { return 0; }
public int getMaxHeight() { return 0; }
@Override
public int getMinHeight() { return IDhApiLevelWrapper.super.getMinHeight(); }