Skip to content

Commit 57f832c

Browse files
committed
Fixed extended heightmap loading
1 parent 8f389d6 commit 57f832c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • station-flattening-v0/src/main/java/net/modificationstation/stationapi/impl/world/chunk

station-flattening-v0/src/main/java/net/modificationstation/stationapi/impl/world/chunk/FlattenedChunk.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void loadStoredHeightmap(byte[] heightmap) {
8181
else {
8282
for (short i = 0; i < 256; i++) {
8383
int index = i << 1;
84-
stationHeightmap[i] = (short) (heightmap[index] | (heightmap[index | 1] << 8));
84+
stationHeightmap[i] = (short) (Byte.toUnsignedInt(heightmap[index]) | (heightmap[index | 1] << 8));
8585
}
8686
}
8787
}

0 commit comments

Comments
 (0)