Skip to content

Commit

Permalink
handle empty chunks in loader chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
mworzala committed Sep 3, 2023
1 parent d3bbb8b commit c5bf761
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/net/hollowcube/polar/PolarLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ public void loadInstance(@NotNull Instance instance) {
// actually on second thought, do we really even need to lock the chunk? it is a local variable still
int sectionY = chunk.getMinSection();
for (var sectionData : chunkData.sections()) {
if (sectionData.isEmpty()) continue;
if (sectionData.isEmpty()) {
sectionY++;
continue;
}

var section = chunk.getSection(sectionY);
loadSection(sectionData, section);
Expand Down

0 comments on commit c5bf761

Please sign in to comment.