Null check max status in GenerationChunkHolder#getChunkIfPresent

If the ticket level is set to unloaded, then it will be null.
This commit is contained in:
Spottedleaf
2024-06-16 12:12:42 -07:00
parent 867f165eb6
commit 62efccbd3f

View File

@@ -226,7 +226,7 @@ public abstract class GenerationChunkHolderMixin {
public ChunkAccess getChunkIfPresent(final ChunkStatus chunkStatus) {
final ChunkStatus maxStatus = ChunkLevel.generationStatus(this.getTicketLevel());
if (chunkStatus.isOrAfter(maxStatus)) {
if (maxStatus == null || chunkStatus.isOrAfter(maxStatus)) {
return null;
}