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

[Feature]: Add Folia #113

Open
Cartrigger opened this issue Jun 23, 2024 · 12 comments · Fixed by CJCrafter/VivecraftSpigot#5
Open

[Feature]: Add Folia #113

Cartrigger opened this issue Jun 23, 2024 · 12 comments · Fixed by CJCrafter/VivecraftSpigot#5

Comments

@Cartrigger
Copy link

Cartrigger commented Jun 23, 2024

Why Do you Want This Feature?

Over the past year, a new sever software named Folia has come into testing stages, created by PaperMC it does multithreading much better than any non Regionalized Multithreading server software, like its said, its used for Skyblock, SMPs and the main thing for many users of the software, events that have thousands online at one time. It would be great to start supporting Folia, I do not know much about porting to non main threaded operations and things that are not included in Folia, it would be good to look into it at least.
https://papermc.io/software/folia

I am hoping to see this implemented for VR events mostly and SMPs.

@Cartrigger
Copy link
Author

Current issue with folia

[02:39:24 ERROR]: Error occurred while enabling Vivecraft-Spigot-Extensions v1.20.6-1 (Is it up to date?)
java.lang.UnsupportedOperationException: null
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.handle(CraftScheduler.java:535) ~[?:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:235) ~[?:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:211) ~[?:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:206) ~[?:?]
        at Vivecraft_Spigot_Extensions-1.20.6-1.jar/org.vivecraft.VSE.onEnable(VSE.java:183) ~[Vivecraft_Spigot_Extensions-1.20.6-1.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[folia-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[folia-1.20.6.jar:1.20.6-DEV-d797082]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[folia-1.20.6.jar:1.20.6-DEV-d797082]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[folia-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:632) ~[?:?]
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:581) ~[?:?]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:717) ~[folia-1.20.6.jar:1.20.6-DEV-d797082]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:464) ~[folia-1.20.6.jar:1.20.6-DEV-d797082]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[folia-1.20.6.jar:1.20.6-DEV-d797082]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1218) ~[folia-1.20.6.jar:1.20.6-DEV-d797082]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:350) ~[folia-1.20.6.jar:1.20.6-DEV-d797082]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

@fayer3
Copy link
Contributor

fayer3 commented Jun 23, 2024

some things in vivecraft rely on being on the main thread, or at least on the same one the server player is processed.
for example the roomscale bow needs that

@Cartrigger Cartrigger changed the title Feature: Add Folia [Feature]: Add Folia Jul 14, 2024
@Cartrigger
Copy link
Author

Alright it looks like CJCrafter did it

@fayer3
Copy link
Contributor

fayer3 commented Oct 5, 2024

I'm unsure if that will actually work right

@fayer3
Copy link
Contributor

fayer3 commented Oct 5, 2024

yeah, it doesn't handle the packets right

@thejudge156
Copy link

Mind clarifying what you mean? I tested it and it worked alright.

@fayer3
Copy link
Contributor

fayer3 commented Oct 5, 2024

throws errors when shooting bows, about not using async teleport

@Cartrigger
Copy link
Author

yeah your right

@CJCrafter
Copy link

CJCrafter commented Oct 9, 2024

fixed that, my bad... issue was that the old teleport method is completely unsupported on folia. Added an API to use the correct one depending on the server

@fayer3
Copy link
Contributor

fayer3 commented Oct 10, 2024

arrows don't throw errors anymore, still don't work right though.
they shoot where you aim at, but the intital arrow faces in the direction your draw arm points at, and tarrows still spawn at the face

@CJCrafter
Copy link

CJCrafter commented Oct 10, 2024

Do you mean that the arrow spawns in the face, but then gets teleported ~100ms later to the correct position? So there is some sort of visual flash that is annoying and breaks immersion? That can be hard to fix without a packet listener to cancel outgoing entity meta packets... Let me know and I'll investigate a solution

@fayer3
Copy link
Contributor

fayer3 commented Oct 10, 2024

no, it just doesn't use the correct spawn position

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

Successfully merging a pull request may close this issue.

4 participants