fix: there's some unknown issue with y index being out of bounds for some reason on kaboom ONLY
This commit is contained in:
@@ -35,16 +35,16 @@ public class ChunkColumn {
|
||||
|
||||
int yIndex = (y - minY) >> 4;
|
||||
|
||||
if (chunks[yIndex] == null) return 0;
|
||||
if (yIndex >= chunks.length) return 0;
|
||||
|
||||
return chunks[yIndex].getBlock(x, y & 15, z);
|
||||
}
|
||||
|
||||
public void setBlock (int x, int y, int z, int id) {
|
||||
if (chunks == null) return;
|
||||
|
||||
int yIndex = (y - minY) >> 4;
|
||||
|
||||
if (yIndex >= chunks.length) return;
|
||||
|
||||
if (chunks[yIndex] == null) {
|
||||
chunks[yIndex] = new ChunkSection();
|
||||
chunks[yIndex].setBlock(0, 0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user