8000 Add full compatibility with Folia 1.21+ by denfry · Pull Request #11 · alvindimas05/LagAssist · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Add full compatibility with Folia 1.21+ #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

denfry
Copy link
@denfry denfry commented Mar 4, 2025

This pull-request implements full plugin compatibility with Folia-based servers (versions 1.21+). Major changes include:

ServerType definition:
Uses the existing ServerType class to determine if a server is running under Folia, allowing conditional application of different ways of scheduling tasks.

Correct execution of synchronous and asynchronous operations:
All operations that require access to world data (e.g., reading chunks, getting tile entities) are now executed on a “synchronous” thread via GlobalRegionScheduler, preventing errors like “Cannot read world asynchronously”.
Heavy calculations and sorting now run asynchronously where possible, and sending messages to the player is always on a synchronous thread.

Compatibility with Classic Paper:
In the absence of Folia, the plugin continues to run as standard using Bukkit.getScheduler().runTask() and runTaskAsynchronously().

Testing:
The changes have been tested on servers running Folia 1.21+ and regular Paper, confirming that all tasks run correctly without world access errors.

@alvindimas05
Copy link
Owner

This is definitely a big change. Thanks for the PR. I will try to build, test, and merge it asap :)

@denfry
Copy link
Author
denfry commented Mar 6, 2025

Add compatibility with PreGenChunk, DynView, and SafetyManager.
Enhance the logging system.
PreGenChunk improved logs

TODO: Revamp the appearance of all logs for a fresh, modern look.

@denfry
Copy link
Author
denfry commented Mar 6, 2025

Started making improved logs, looks ok?
Logs

@alvindimas05
Copy link
Owner
alvindimas05 commented Mar 6, 2025

Started making improved logs, looks ok? Logs

Definitely looks better :D
I think I can just merge it but need some time to prepare for the workflow.

Edit : Test runs fine with default build command. Let me know if you are ready to merge it :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0