Skip to content

Commit

Permalink
fix: Validate chunk section Y axis upon retrieving ChunkRenderContain…
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese authored Mar 20, 2021
1 parent 7b05d16 commit b238a6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public void setRender(int y, ChunkRenderContainer render) {
}

public ChunkRenderContainer getRender(int y) {
if (y < 0 || y >= this.renders.length) {
return null;
}
return this.renders[y];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,6 @@ public int getTotalSections() {
}

public void scheduleRebuild(int x, int y, int z, boolean important) {
if (y < 0 || y >= 16) {
return;
}

ChunkRenderContainer render = this.getRender(x, y, z);

if (render != null) {
Expand Down

0 comments on commit b238a6b

Please sign in to comment.