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

Extend the Folia Support from SirYwell #2171

Conversation

TheMeinerLP
Copy link
Member

@TheMeinerLP TheMeinerLP commented Apr 2, 2023

Overview

I improved the original branch from @SirYwell some functions already works but still some tasks over.

Description

Add extended Folia Support.
Required local builded folia jar file

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

TODO's

This list will extended in the future.

  • Wand tool
  • Undo/Redo command
  • Set Command
  • Regen Command(Some issues still there)
  • Brush Command
  • Expand Command
  • Entities copy is not working
  • Compass tool

Pre-build Jar Files

https://ci.athion.net/job/FastAsyncWorldEdit-Pull-Requests/view/change-requests/job/PR-2171/

🤖 Summary sponsored by copilot:

🤖 Generated by Copilot at db4808b

This pull request adds support for the Paper and Folia server APIs for Minecraft 1.19.4 to the worldedit-bukkit module and its adapters. It updates the classes that interact with the server to use the new methods and fields provided by the APIs, and adds the necessary dependencies and properties to the build files and the plugin.yml file. It also fixes a bug that prevented the timer task from running on Folia.

@TheMeinerLP TheMeinerLP requested a review from a team as a code owner April 2, 2023 15:48
@github-actions github-actions bot added the Feature This PR adds a new feature label Apr 2, 2023
@TheMeinerLP TheMeinerLP marked this pull request as draft April 2, 2023 15:57
@TheMeinerLP TheMeinerLP marked this pull request as ready for review April 2, 2023 21:08
dordsor21 and others added 5 commits April 22, 2023 09:45
- This isn't necessarily targeting any fix, but I think we should be ensuring a ticket is being added to chunks "access asynchronously", as done by the getChunkAtAsync method
Improve user experience by adding an explanation to Disallowed-Blocks Configblock (IntellectualSites#2183)
@TheMeinerLP TheMeinerLP marked this pull request as draft April 28, 2023 22:35
renovate bot added 5 commits May 1, 2023 10:03
…es#2204)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ectualSites#2203)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ectualSites#2202)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ht.userdev.gradle.plugin to v1.5.5 (IntellectualSites#2201)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@TheMeinerLP TheMeinerLP changed the title Expand the Folia Support from SirYwell Extend the Folia Support from SirYwell May 1, 2023
@Tudorhc5
Copy link

Tudorhc5 commented May 2, 2023

Used THIS build for some testing. Tried //pos1 & //pos2 (while being at certain points to select the area) ~1.2 Million blocks, then tried to do //set 0.
Gave am an error, said to report it, check the error here : hastebin paste

I am sorry if this is the wrong place to report this, I am not sure if Im meant to make a new issue, since FAWE does not officially support FOLIA.

@TheMeinerLP
Copy link
Member Author

Your paste are empty

@TheMeinerLP
Copy link
Member Author

Also this is in very early state. It support can mean works but not in all cases or possibilities

@Tudorhc5
Copy link

Tudorhc5 commented May 2, 2023

My bad, here are the errors
Trying to paste a schematic : https://pastebin.com/vVNAJh5d
Trying to //set 0 the 1.7m blocks this time : https://pastebin.com/B4XbFAu7

@Tudorhc5
Copy link

Tudorhc5 commented May 2, 2023

Regarding being in an early state:
I understand, and I do not have any feature request, nor looking to complain. I reported these errors because i thought you specifically coded "Please report this error". I am hyped about FOLIA and want to help any way I can.

@nicolube
Copy link

nicolube commented May 7, 2023

Hello there, for me the PaperweightFaweAdapter is not loading, caused by an ClassNotFoundExeption
Minecraft 1.19.4 does not contain net/minecraft/nbt/NBTBase but I'm not even sure where it is used exactly.

Any idea why this happening?

Folia Build:
https://jenkins.lube.app/job/Folia/

Error:

[03:46:25] [Server thread/WARN]: 2Failed to load the Bukkit adapter class 'com.sk89q.worldedit.folia.adapter.impl.fawe.v1_19_R3.PaperweightFaweAdapter'
java.lang.NoClassDefFoundError: net/minecraft/nbt/NBTBase
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:375) ~[?:?]
	at com.sk89q.worldedit.bukkit.adapter.BukkitImplLoader.loadAdapter(BukkitImplLoader.java:179) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.loadAdapter(WorldEditPlugin.java:366) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.setupPreWorldData(WorldEditPlugin.java:237) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.onEnable(WorldEditPlugin.java:208) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:279) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:192) ~[folia-1.19.4.jar:git-Folia-9]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:631) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:542) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:348) ~[folia-1.19.4.jar:git-Folia-9]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.minecraft.nbt.NBTBase
	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:183) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:150) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	... 16 more
[03:46:25] [Server thread/INFO]: Pre Check: com.sk89q.worldedit.folia.adapter.impl.fawe.v1_19_R3.PaperweightBlockMaterial
[03:46:25] [Server thread/WARN]: 2Failed to load the Bukkit adapter class 'com.sk89q.worldedit.folia.adapter.impl.fawe.v1_19_R3.PaperweightBlockMaterial'
java.lang.NoClassDefFoundError: net/minecraft/world/level/IBlockAccess
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:375) ~[?:?]
	at com.sk89q.worldedit.bukkit.adapter.BukkitImplLoader.loadAdapter(BukkitImplLoader.java:179) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.loadAdapter(WorldEditPlugin.java:366) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.setupPreWorldData(WorldEditPlugin.java:237) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.onEnable(WorldEditPlugin.java:208) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:279) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:192) ~[folia-1.19.4.jar:git-Folia-9]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:631) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:542) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:348) ~[folia-1.19.4.jar:git-Folia-9]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.level.IBlockAccess
	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:183) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:150) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	... 16 more
[03:46:25] [Server thread/WARN]: 
**********************************************
** This FastAsyncWorldEdit version does not fully support your version of Bukkit.
** You can fix this by:
** - Updating your server version (Check /version to see how many versions you are behind)
** - Updating FAWE
**
** When working with blocks or undoing, chests will be empty, signs
** will be blank, and so on. There will be no support for entity
** and block property-related functions.
**********************************************

@TheMeinerLP
Copy link
Member Author

Hello there, for me the PaperweightFaweAdapter is not loading, caused by an ClassNotFoundExeption Minecraft 1.19.4 does not contain net/minecraft/nbt/NBTBase but I'm not even sure where it is used exactly.

Any idea why this happening?

Folia Build: https://jenkins.lube.app/job/Folia/

Error:

[03:46:25] [Server thread/WARN]: 2Failed to load the Bukkit adapter class 'com.sk89q.worldedit.folia.adapter.impl.fawe.v1_19_R3.PaperweightFaweAdapter'
java.lang.NoClassDefFoundError: net/minecraft/nbt/NBTBase
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:375) ~[?:?]
	at com.sk89q.worldedit.bukkit.adapter.BukkitImplLoader.loadAdapter(BukkitImplLoader.java:179) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.loadAdapter(WorldEditPlugin.java:366) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.setupPreWorldData(WorldEditPlugin.java:237) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.onEnable(WorldEditPlugin.java:208) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:279) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:192) ~[folia-1.19.4.jar:git-Folia-9]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:631) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:542) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:348) ~[folia-1.19.4.jar:git-Folia-9]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.minecraft.nbt.NBTBase
	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:183) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:150) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	... 16 more
[03:46:25] [Server thread/INFO]: Pre Check: com.sk89q.worldedit.folia.adapter.impl.fawe.v1_19_R3.PaperweightBlockMaterial
[03:46:25] [Server thread/WARN]: 2Failed to load the Bukkit adapter class 'com.sk89q.worldedit.folia.adapter.impl.fawe.v1_19_R3.PaperweightBlockMaterial'
java.lang.NoClassDefFoundError: net/minecraft/world/level/IBlockAccess
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:375) ~[?:?]
	at com.sk89q.worldedit.bukkit.adapter.BukkitImplLoader.loadAdapter(BukkitImplLoader.java:179) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.loadAdapter(WorldEditPlugin.java:366) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.setupPreWorldData(WorldEditPlugin.java:237) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.onEnable(WorldEditPlugin.java:208) ~[FastAsyncWorldEdit-Bukkit-2.6.0-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:279) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:192) ~[folia-1.19.4.jar:git-Folia-9]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:631) ~[folia-1.19.4.jar:git-Folia-9]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:542) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[folia-1.19.4.jar:git-Folia-9]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:348) ~[folia-1.19.4.jar:git-Folia-9]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.level.IBlockAccess
	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:183) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:150) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	... 16 more
[03:46:25] [Server thread/WARN]: 
**********************************************
** This FastAsyncWorldEdit version does not fully support your version of Bukkit.
** You can fix this by:
** - Updating your server version (Check /version to see how many versions you are behind)
** - Updating FAWE
**
** When working with blocks or undoing, chests will be empty, signs
** will be blank, and so on. There will be no support for entity
** and block property-related functions.
**********************************************

Thanks to report this. I think you builded littlebit wrong. But i am currently too busy with school exams to invetigate here.
After my exams i will look into

@nicolube
Copy link

nicolube commented May 7, 2023

Nevermind I messed up with building Folia, it works now...

@TheMeinerLP
Copy link
Member Author

Nevermind I messed up with building Folia, it works now...

Perfect, thanks

@MattBDev MattBDev added the Folia label May 13, 2023
# Conflicts:
#	build.gradle.kts
#	worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java
@github-actions
Copy link

Please take a moment and address the merge conflicts of your pull request. Thanks!

1 similar comment
@github-actions
Copy link

Please take a moment and address the merge conflicts of your pull request. Thanks!

@StKillReal
Copy link

Is there any news about development?

@TheMeinerLP
Copy link
Member Author

Closed and will be replaced by: #2309

@TheMeinerLP TheMeinerLP closed this Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants