Skip to content

Conversation

@R00tB33rMan
Copy link
Contributor

@R00tB33rMan R00tB33rMan commented Nov 3, 2025

This PR implements Folia support in FastAsyncWorldEdit and even reintroduces //regen into Folia, which was thought to be impossible or extraordinarily difficult to achieve. I have gone ahead and tested this comprehensively on a 100-200 player Duels server against Folia that creates and removes schematics at all times. Before this, various commands, including extensions (e.g., copying an entity), have been tested and verified to work, along with some basic testing across every possible NMS version FastAsyncWorldEdit supports. Let me know if any changes are absolutely required!

Misc. change: For fresh users, the plugin fails to compile. I went ahead and resolved this in the very first change by migrating to Adoptium.

Additional note: against FAWE, capturing states is required against reflection and cannot be directly referenced

Supersedes: #2682 & #2309
Resolves: #2297

This was also done for WorldEdit: EngineHub/WorldEdit#2848

This PR implements Folia support in FastAsyncWorldEdit and even reintroduces `//regen` into Folia, which was thought to be impossible or extraordinarily difficult to achieve. I have gone ahead and tested this comprehensively on a 100-200 player Duels server against Folia that creates and removes schematics at all times. Before this, various commands, including extensions (e.g., copying an entity), have been tested and verified to work, along with some basic testing across every possible NMS version FastAsyncWorldEdit supports. Let me know if any changes are absolutely required!
@R00tB33rMan R00tB33rMan requested a review from a team as a code owner November 3, 2025 04:27
@github-actions github-actions bot added the Feature This PR adds a new feature label Nov 3, 2025
R00tB33rMan added a commit to FreshSMP/WorldEdit that referenced this pull request Nov 3, 2025
This is a thoroughly tested version of WorldEdit against Folia. Not only does it introduce the fundamentals that other forks have offered, but it also provides the ability to utilize `-e` tags, butchering entities, and even the `//regen` command on Spigot, Paper, and Folia alike. That said, this pull request is ready for review, so critical changes (if needed) can be made to ensure Folia is sufficient and prepared for WorldEdit upstream.

This was also done for FastAsyncWorldEdit: IntellectualSites/FastAsyncWorldEdit#3363
@SirYwell
Copy link
Member

SirYwell commented Nov 4, 2025

#2682 explains the rules about Folia contributions.

@SirYwell SirYwell closed this Nov 4, 2025
@R00tB33rMan
Copy link
Contributor Author

R00tB33rMan commented Nov 4, 2025

#2682 explains the rules about Folia contributions.

I appreciate your concerns; however, I tried my very best to keep FAWE’s code changes minimal and tried my best to adhere to your guidelines as best as possible. If this isn’t what you’re asking for then what is being asked of? I spent a really long time testing and preparing this fork and specific examples of what isn’t ideal would be best and/or alternatives. Part of the reason why this PR is so large is due to the nature of FAWE’s NMS classes for various tasks/operations, so it’s effectively impossible to distinguish what the best approach is towards implementing Folia wholesale. To me it seems impossible to even attempt Folia if this format is not considered acceptable.

TL;DR: It is impossible to create a completely Folia-ready FAWE without writing to specific NMS classes.

@SirYwell
Copy link
Member

SirYwell commented Nov 4, 2025

A few of the relevant points:

  • If you want to help, make sure you understand what's going on.
  • We do not try to re-enable features that just aren't supported by Folia at the moment.
  • Don't try to implement something just to have it implemented. Only implement things you can reason about.
  • Open a PR targeting this branch. [...]
  • Discussing changes with us before will increase the likelihood of changes useful for us.

Your code includes (but isn't limited to) the following problems:

  • Not the right target branch.
  • Random changes to the build system.
  • Improper re-implementations of existing features.
  • Improper use of Exceptions/problematic exception handling.
  • Completely unrelated code changes.

If you are willed to work hard for a long time with no guarantees of any results, you can ping me on Discord and we can find a way how we can get my PR (and before that, the v3 branch) up-to-date and work from there. If it's not possible to do this in small steps, it most likely is the wrong approach.

@R00tB33rMan
Copy link
Contributor Author

R00tB33rMan commented Nov 4, 2025

A few of the relevant points:

  • If you want to help, make sure you understand what's going on.
  • We do not try to re-enable features that just aren't supported by Folia at the moment.
  • Don't try to implement something just to have it implemented. Only implement things you can reason about.
  • Open a PR targeting this branch. [...]
  • Discussing changes with us before will increase the likelihood of changes useful for us.

Your code includes (but isn't limited to) the following problems:

  • Not the right target branch.
  • Random changes to the build system.
  • Improper re-implementations of existing features.
  • Improper use of Exceptions/problematic exception handling.
  • Completely unrelated code changes.

If you are willed to work hard for a long time with no guarantees of any results, you can ping me on Discord and we can find a way how we can get my PR (and before that, the v3 branch) up-to-date and work from there. If it's not possible to do this in small steps, it most likely is the wrong approach.

Sure, I'm perfectly fine with addressing all points; however, can you clarify the screenshotted? I do understand to an extent; however, some context would help whilst rebuilding this PR. My understanding regarding one of the points is that there is a lot of code reuse, which FAWE in a lot of ways inheritly does
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature This PR adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Folia support

2 participants