Skip to content

Commit

Permalink
Clean up remaining byte casts from 39081e6
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Apr 20, 2022
1 parent c94cbf2 commit f5ef0ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY
}
int result = cacheHeights[index] & 0xFF;
if (result == minY) {
cacheHeights[index] = (byte) (result = lastY = super
cacheHeights[index] = (short) (result = lastY = super
.getNearestSurfaceTerrainBlock(x, z, lastY, minY, maxY));
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void reset() {
lastY = Integer.MIN_VALUE;
lastZ = Integer.MIN_VALUE;
if (cacheHeights != null) {
Arrays.fill(cacheHeights, (byte) 0);
Arrays.fill(cacheHeights, (short) 0);
}
}

Expand All @@ -75,7 +75,7 @@ protected int getHeight(Extent extent, int x, int y, int z) {
}
int result = cacheHeights[index];
if (y > result) {
cacheHeights[index] = (byte) (result = lastY = extent.getNearestSurfaceTerrainBlock(x, z, lastY, minY, maxY));
cacheHeights[index] = (short) (result = lastY = extent.getNearestSurfaceTerrainBlock(x, z, lastY, minY, maxY));
}
return result;
}
Expand Down

0 comments on commit f5ef0ca

Please sign in to comment.