Skip to content

Commit

Permalink
fix: postprocessing serialization in gcFreeChunkSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Dec 16, 2024
1 parent d0deceb commit 9f4cd80
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,18 @@ private static void checkLightFlag(boolean lightCorrect, NbtWriter writer) {
}

private static void putShortListArray(ShortList[] data, NbtWriter writer, byte[] name) {
long start = writer.startList(name, NbtElement.LIST_TYPE);
int count = 0;
writer.startFixedList(name, data.length, NbtElement.LIST_TYPE);

for (ShortList shortList : data) {
if (shortList != null) {
writer.startFixedListEntry(shortList.size(), NbtElement.SHORT_TYPE);
for (Short short_ : shortList) {
writer.putShortEntry(short_);
}
count ++;
} else {
writer.startFixedListEntry(0, NbtElement.SHORT_TYPE);
}
}

writer.finishList(start, count);
}

private static void writeSectionData(
Expand Down

0 comments on commit 9f4cd80

Please sign in to comment.