-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChunkLoadEvent and ChunkUnloadEvent never fire after upstream changes #1560
Comments
I would also add that this was discovered in part because WorldGuard depends on these events, and regions do not appear to load at all when the events are not fired. That means that servers updating to this version will likely lose world protection entirely. |
@joshuaprince Since these are paper upstream commits you'll want to test this on Paper builds too. Purpur build 2266 merges in changes from Paper builds 82-89. |
Oh I completely missed that you already tested on latest Paper. Will look into this. |
@granny It looks like Paper public static void onChunkBorder(final LevelChunk chunk, final ChunkHolder holder) {
// TODO move hook
io.papermc.paper.chunk.system.ChunkSystem.onChunkBorder(chunk, holder);
chunk.loadCallback(); // Paper
}
public static void onChunkNotBorder(final LevelChunk chunk, final ChunkHolder holder) {
// TODO move hook
io.papermc.paper.chunk.system.ChunkSystem.onChunkNotBorder(chunk, holder);
chunk.unloadCallback(); // Paper
} Purpur public static void onChunkBorder(final LevelChunk chunk, final ChunkHolder holder) {
((ChunkSystemServerLevel)((ServerLevel)chunk.getLevel())).moonrise$getLoadedChunks().add(
((ChunkSystemLevelChunk)chunk).moonrise$getChunkAndHolder()
);
}
public static void onChunkNotBorder(final LevelChunk chunk, final ChunkHolder holder) {
((ChunkSystemServerLevel)((ServerLevel)chunk.getLevel())).moonrise$getLoadedChunks().remove(
((ChunkSystemLevelChunk)chunk).moonrise$getChunkAndHolder()
);
}
edited to add: They're actually 2 different |
The copy of Paper that you're traversing is outdated by 4 commits. Leaf moves |
You're right, trying it again on a freshly-cleaned Paper repo, I can reproduce it there too. I'll open an issue on their tracker. |
I've created a PR to Paper fixing this issue here: PaperMC/Paper#11104. I've also gone ahead and applied it to Purpur ahead of time since I'm getting ready for bed (and won't be able to upstream until I wake up!). |
Spark link
Not Relevant
Expected behavior
ChunkLoadEvent and ChunkUnloadEvent should fire regularly as chunks load and unload.
Observed/Actual behavior
These events do not fire at all as of today's Purpur build 2266.
Steps/models to reproduce
Added to test plugin:
Join the server and confirm that the move event correctly logs positions as a control test, but the other two events never fire.
Purpur version
Self-built Purpur 2266, 86a6543
Agreements
Other
The same test plugin was tested on the following:
(working)Actually NOT workingThe text was updated successfully, but these errors were encountered: