World height shader should now be less abrupt.

This commit is contained in:
Harrison Deng 2020-04-26 15:03:34 -05:00
parent 925296f326
commit 60217e4672

View File

@ -55,11 +55,9 @@ public class WorldHeightShader {
} }
private int calculateTerrainHeight(int worldX, int worldZ) { private int calculateTerrainHeight(int worldX, int worldZ) {
double islandValue = islandLocator.getWorldBlockValue(worldX, worldZ); double islandValue = islandLocator.getWorldBlockValue(worldX, worldZ) + 1D;
if (islandValue >= 0) { islandValue *= 100;
return seaLevel; return (int) Math.min(63, islandValue);
}
return (int) Math.max((- islandValue) * seaLevel, minimumHeight);
} }
private double getHeightModifier(int worldX, int worldZ) { private double getHeightModifier(int worldX, int worldZ) {