Fix ChunkHolder#getFullChunkNow returning non-null when it should not

In the new chunk system, the chunk is only at FULL when either
the FULL callbacks have been invoked or during the FULL callbacks.
This commit is contained in:
Spottedleaf 2024-06-19 10:42:48 -07:00
parent 3c4ca08b26
commit e985ffabb2

View file

@ -22899,7 +22899,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public LevelChunk getFullChunkNow() {
// Note: We use the oldTicketLevel for isLoaded checks.
- if (!ChunkLevel.fullStatus(this.oldTicketLevel).isOrAfter(FullChunkStatus.FULL)) return null;
+ if (!ChunkLevel.fullStatus(this.newChunkHolder.oldTicketLevel).isOrAfter(FullChunkStatus.FULL)) return null; // Paper - rewrite chunk system
+ if (!this.newChunkHolder.isFullChunkReady()) return null; // Paper - rewrite chunk system
return this.getFullChunkNowUnchecked();
}