Update height calc to better match client

This commit is contained in:
Adam
2016-12-25 18:59:04 -05:00
parent 70a56c3c91
commit 6ac4116d70
2 changed files with 5 additions and 7 deletions

View File

@@ -43,13 +43,11 @@ public class HeightCalc
}
}
public static int calculate(int baseX, int baseY, int x, int y)
public static int calculate(int x, int y)
{
int xc = (baseX >> 3) + 932731 + x;
int yc = (baseY >> 3) + 556238 + y;
int n = interpolateNoise(xc + 45365, yc + 91923, 4) - 128
+ (interpolateNoise(10294 + xc, yc + 37821, 2) - 128 >> 1)
+ (interpolateNoise(xc, yc, 1) - 128 >> 2);
int n = interpolateNoise(x + 45365, y + 91923, 4) - 128
+ (interpolateNoise(10294 + x, y + 37821, 2) - 128 >> 1)
+ (interpolateNoise(x, y, 1) - 128 >> 2);
n = 35 + (int) ((double) n * 0.3D);
if (n < 10)
{

View File

@@ -74,7 +74,7 @@ public class Region
{
if (z == 0)
{
tileHeights[0][x][y] = -HeightCalc.calculate(baseX, baseY, x, y) * 8;
tileHeights[0][x][y] = -HeightCalc.calculate(baseX + x + 0xe3b7b, baseY + y + 0x87cce) * 8;
}
else
{