Skip to content

Fix loadChunksAsync ignoring ChunkStatus passed in - #14220

Merged
lynxplay merged 1 commit into
PaperMC:mainfrom
HaHaWTH:fix/load-chunk-ignoring-chunkstatus
Aug 29, 2026
Merged

Fix loadChunksAsync ignoring ChunkStatus passed in#14220
lynxplay merged 1 commit into
PaperMC:mainfrom
HaHaWTH:fix/load-chunk-ignoring-chunkstatus

Conversation

@HaHaWTH

@HaHaWTH HaHaWTH commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Discovered this while implementing a feature in my fork that uses moonrise$loadChunksAsync with ChunkStatus.EMPTY.

The method above didn't honor the chunk status I've passed in and always load chunks as FULL level.

This PR passes the requested chunk status to scheduleChunkLoad instead of the hard-coding ChunkStatus.FULL.

Currently Paper doesn't have callers that are passing levels lower than FULL, so it looks more likely a future-proof fix.

@HaHaWTH
HaHaWTH requested a review from a team as a code owner August 29, 2026 11:04
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Aug 29, 2026

@lynxplay lynxplay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong patch to fix this in.
The chunk status param is introduced by moonrise, this diff needs to live in that patch as well.

@github-project-automation github-project-automation Bot moved this from Awaiting review to Changes required in Paper PR Queue Aug 29, 2026
@lynxplay

Copy link
Copy Markdown
Contributor

Beyond that, LGTM, moonrise correctly uses the param.

@HaHaWTH
HaHaWTH force-pushed the fix/load-chunk-ignoring-chunkstatus branch from 22c6d74 to 4cb0a9e Compare August 29, 2026 11:18
@HaHaWTH

HaHaWTH commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

This is the wrong patch to fix this in. The chunk status param is introduced by moonrise, this diff needs to live in that patch as well.

I've moved the diff into the Moonrise optimization patch

@HaHaWTH
HaHaWTH requested a review from lynxplay August 29, 2026 11:23
@papermc-projects papermc-projects Bot moved this from Changes required to Full approval in Paper PR Queue Aug 29, 2026
@lynxplay
lynxplay merged commit a2a42c5 into PaperMC:main Aug 29, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Full approval to Merged in Paper PR Queue Aug 29, 2026
@HaHaWTH
HaHaWTH deleted the fix/load-chunk-ignoring-chunkstatus branch August 29, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

2 participants