Skip to content
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

Add ticket on player join to avoid chunk load-unload-load cycle #11398

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jpenilla
Copy link
Member

@jpenilla jpenilla commented Sep 13, 2024

Adding the entity will add and then immediately remove an entity load ticket, which would result in the chunk loading and then unloading before being loaded again once the player chunk loader reacts (delay can vary based on rate limit configs)

By adding a ticket with a short removal delay we attempt to keep the chunk loaded until the player chunk loader reacts, but this is not a guarantee due to the aforementioned rate limit configs. Plugins should still handle load/unload events as normal, however this will reduce redundant calls.

The delay is currently set to 2 seconds, however, we may want to adjust this before merging (for example the player chunk unload delay is 5 seconds)

fixes #9581

Adding the entity will add and then immediately remove an entity load ticket, which would result in the chunk loading and then unloading before being loaded again once the player chunk loader reacts (delay can vary based on rate limit configs)

By adding a ticket with a short removal delay we attempt to keep the chunk loaded until the player chunk loader reacts, but this is not a guarantee due to the aforementioned rate limit configs. Plugins should still handle load/unload events as normal, however this will reduce redundant calls.

The delay is currently set to 2 seconds, however we may want to adjust this before merging
@jpenilla jpenilla requested a review from a team as a code owner September 13, 2024 21:38
jpenilla added a commit to Tuinity/Moonrise that referenced this pull request Sep 13, 2024
@jpenilla jpenilla marked this pull request as draft September 14, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Awaiting final testing
Development

Successfully merging this pull request may close these issues.

EntityAddToWorld/EntityRemoveFromWorld fired incorrectly in some cases
2 participants