PrisonTeam / Prison

The home of the Prison project, a Minecraft plugin to provide mining and ranking gameplay experience.
https://www.spigotmc.org/resources/prison.1223/
Other
118 stars 42 forks source link

Request support for Folia #250

Open Q2297045667 opened 1 year ago

Q2297045667 commented 1 year ago

Here is a summary of everything made with ChatGPT to save some time:

For plugin developers, there are a few key takeaways from the given text:

Folia introduces regionised multithreading, which means that plugins will require modification to function properly. Plugin developers should expect compatibility with existing plugins to be at zero.

Folia introduces new API additions, such as the RegionisedScheduler and EntityScheduler, which can help plugins run on the correct thread context.

To ensure compatibility with Folia, plugin developers must mark their plugin as compatible by placing "folia-supported: true" in the plugin.yml file. Additionally, plugins must take advantage of the RegionisedScheduler and EntityScheduler API to ensure correct behavior.

Plugins should not assume that they can access or modify data in other regions, as Folia regions tick in parallel and do not share data. Plugin developers should take advantage of the upcoming thread-check API to ensure correct behavior.

There are currently broken API, including the scoreboard API, and planned API changes, such as super aggressive thread checks, which may impact plugin development.

Overall, plugin developers should be prepared for significant changes in their plugins to ensure compatibility with Folia. They should take advantage of the new API additions and mark their plugin as compatible to ensure correct behavior. Additionally, they should be aware of the limitations and rules of Folia's regionised multithreading to avoid bugs and errors in their plugins.

rbluer commented 1 year ago

I'm sorry, I'm not sure if you're a bot or not, but the content of this issue sounds like something a bot would generate.

If you'd like to talk about this in greater details, please visit our discord server and ping me: RoyalBlueRanger.

I've already read the above about 2 weeks ago, and I'm game to get prison working with Folia. I'm just not sure when I can get to this.

GABRYCA commented 1 year ago

I agree, sounds like a bot.

Q2297045667 commented 1 year ago

I'm sorry, I'm not sure if you're a bot or not, but the content of this issue sounds like something a bot would generate.

If you'd like to talk about this in greater details, please visit our discord server and ping me: RoyalBlueRanger.

I've already read the above about 2 weeks ago, and I'm game to get prison working with Folia. I'm just not sure when I can get to this.

Thank you for your reply. I don't know much English, so I can only copy other people's issues I have a general understanding of your reply

rbluer commented 8 months ago

Folia Support in Prison...

I've kept this ticket open for a few reasons, but I think it may be important to provide a short reason why I am not going to support folia right now.

  1. The system requirements for Folia are massive. Most people will not be able to afford servers with at least 16 threads. Therefore, I cannot take simple requests for Folia support seriously since most people who may ask for it, will not have a true need for it. If you really have a true need for Folia, then please DM me in discord and let's talk.

  2. Reading the Folia docs months ago, there is one major area that I would be concerned about within prison.
    A. The primary concern would be the prison mine's block list. Prison tracks all blocks that "should" be in the mine, so it can ensure that players cannot scam the server placing blocks and mining them, it helps to ensure that block constraints are upheld (block constrains allows you to specify min and max number of a specific block that spawns in a mine, and you can control which layers a block can spawn too. This could be fixed by synchronizing the collections that are used internally, and that could be done by a config setting.
    B. There may be other collections that would need to be synchronized too. Full scope has not been considered. C. Mine Resets - Mine resets in prison is one of the most expensive processes, so it could benefit from Folia. But the problem would be with how the prison internals will be able to identify the Folia chunks to submit the various tasks to. I know, Folia handles that automatically, but it makes no sense to submit a task that would update blocks in 4 different Folia chunks. So prison would have to be proactive to ensure each chunk is only handling it's own blocks.

  3. There are a number of resources and commands that Folia currently disables. Some of those components may adversely impact prison functionality. So these concerns, or functional losses, would have to be explored in greater detail.

I just read some documentation on Folia about their regions. Basically what I'm seeing, is that for a given mine, that mine should wholly live within one Folia region. "Should". If a mine contains more than one Folia region, then there may be a slight internal adjustments to those Folia regions by adding chunks or merging regions. Basically something prison will not need to be concerned about overall.

So what I am now thinking, is that most of what I said above in items 2A, 2B, and 2C, they may still apply, but they may be less important. It also gives me the impression that when designing a prison server to run on Folia, the owner/admins must purposefully design the server to work with Folia. This means placing mines far enough away from each other, so that each will get it's own Folia region. Or, place some mines close enough so they share the same Folia region.

The bottom line is that mine placement will be critical to ensure Folia works well. If this is true, then prison may work out-of-the-box with Folia... maybe with minor changes.