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

Suggestion: Async chunk loading for regen tasks on Paper servers #6337

Closed
galacticwarrior9 opened this issue Nov 26, 2022 · 3 comments · Fixed by #6385
Closed

Suggestion: Async chunk loading for regen tasks on Paper servers #6337

galacticwarrior9 opened this issue Nov 26, 2022 · 3 comments · Fixed by #6385

Comments

@galacticwarrior9
Copy link
Contributor

Please explain your feature request to the best of your abilities:

Towny's regeneration task can cause sync chunk loads if the blocks being regenerated are in unloaded chunks:

Image

It would be good if Towny asynchronously loaded any unloaded chunk that requires regeneration using PaperLib

@LlmDl
Copy link
Member

LlmDl commented Nov 26, 2022

I'm wondering if these chunks should ever be allowed to unload.

It's the task that's run when explosions are regenerated. So the only time it would be unloaded is when the player died to the explosion and then the chunks were unloaded.

Ideally they task is allowed to complete before any of the blocks are unloaded.

@galacticwarrior9
Copy link
Contributor Author

That would work but I foresee problems on servers that set a long regeneration delay, as the number of chunks being forced to stay loaded may quickly stack up

@LlmDl
Copy link
Member

LlmDl commented Nov 27, 2022

Off the top of my head, the explosion regen is locked into one speed. It's supposed to be over quickly.

Also off the top of my head, these tasks are added per-block. So each task's only job is to replace one block, which we're not allowed to do async.

LlmDl added a commit that referenced this issue Dec 20, 2022
Warriorrrr with PR #6384.
    - Closes #6363.
  - New Config Options:
    - notification.bossbars.color
      - Default: "white"
      - The color to use for bossbar notifications.
      -Valid colors are blue, green, pink, purple, red, white, or
yellow.
    - notification.bossbars.overlay
      - Default: "progress"
      - The overlay to use for bossbar notifications.
      - Valid options are progress, notched_6, notched_10, notched_12,
notched_20"
    - notification.bossbars.progress
      - Default: "0"
      - The progress to use for the bossbar, between 0 and 1."
   - Load chunk async for protection regen task, courtesy of Warriorrrr
with PR #6385.
     - Requires you to be using Paper to take advantage.
     - Closes #6337.
LlmDl added a commit that referenced this issue Dec 22, 2022
Warriorrrr with PR #6384.
    - Closes #6363.
  - New Config Options:
    - notification.bossbars.color
      - Default: "white"
      - The color to use for bossbar notifications.
      -Valid colors are blue, green, pink, purple, red, white, or
yellow.
    - notification.bossbars.overlay
      - Default: "progress"
      - The overlay to use for bossbar notifications.
      - Valid options are progress, notched_6, notched_10, notched_12,
notched_20"
    - notification.bossbars.progress
      - Default: "0"
      - The progress to use for the bossbar, between 0 and 1."
   - Load chunk async for protection regen task, courtesy of Warriorrrr
with PR #6385.
     - Requires you to be using Paper to take advantage.
     - Closes #6337.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants