This commit is contained in:
Jesse Boyd 2017-06-18 09:54:51 +10:00
parent 3171fbd953
commit b2261bb9e2
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -63,11 +63,11 @@ public class AngleMask extends SolidBlockMask implements ResettableMask {
Arrays.fill(cacheHeights, (byte) 0); Arrays.fill(cacheHeights, (byte) 0);
} }
} }
lastY = cacheHeights[index] & 0xFF; int result = cacheHeights[index] & 0xFF;
if (lastY == 0) { if (result == 0) {
cacheHeights[index] = (byte) (lastY = getExtent().getNearestSurfaceTerrainBlock(x, z, lastY, 0, maxY)); cacheHeights[index] = (byte) (result = lastY = getExtent().getNearestSurfaceTerrainBlock(x, z, lastY, 0, maxY));
} }
return lastY; return result;
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
throw e; throw e;