From 60217e4672c8217ef99705e98f33d6ddbdeeef5b Mon Sep 17 00:00:00 2001 From: Harrison Date: Sun, 26 Apr 2020 15:03:34 -0500 Subject: [PATCH] World height shader should now be less abrupt. --- .../world/shaders/WorldHeightShader.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/ca/recrown/islandsurvivalcraft/world/shaders/WorldHeightShader.java b/src/main/java/ca/recrown/islandsurvivalcraft/world/shaders/WorldHeightShader.java index 6bbf9e7..e2db4d2 100644 --- a/src/main/java/ca/recrown/islandsurvivalcraft/world/shaders/WorldHeightShader.java +++ b/src/main/java/ca/recrown/islandsurvivalcraft/world/shaders/WorldHeightShader.java @@ -55,11 +55,9 @@ public class WorldHeightShader { } private int calculateTerrainHeight(int worldX, int worldZ) { - double islandValue = islandLocator.getWorldBlockValue(worldX, worldZ); - if (islandValue >= 0) { - return seaLevel; - } - return (int) Math.max((- islandValue) * seaLevel, minimumHeight); + double islandValue = islandLocator.getWorldBlockValue(worldX, worldZ) + 1D; + islandValue *= 100; + return (int) Math.min(63, islandValue); } private double getHeightModifier(int worldX, int worldZ) {