FoliaLib icon indicating copy to clipboard operation
FoliaLib copied to clipboard

FoliaLib can't detect Folia

Open xF3d33 opened this issue 9 months ago • 5 comments

Hi, after i followed all the istructions and started the server, it still can't detect Folia, showing PAPER instead. I also shaded the library as shown in the Readme file.

Image

Image

xF3d33 avatar Apr 20 '25 17:04 xF3d33

Can you explain what you mean by "showing paper instead"? What print are you using for this?

TechnicallyCoded avatar Apr 20 '25 22:04 TechnicallyCoded

i used foliaLib.getImplType() and foliaLib.isFolia()

and in the console i saw PAPER and FALSE

xF3d33 avatar Apr 20 '25 23:04 xF3d33

Please provide the exact folia commit hash (version) you are working with

TechnicallyCoded avatar Apr 21 '25 13:04 TechnicallyCoded

i'm on Folia version 1.21.4-DEV-master@8af1aef (2025-04-20T15:21:56Z)

xF3d33 avatar Apr 21 '25 19:04 xF3d33

any update?

xF3d33 avatar Apr 23 '25 09:04 xF3d33

anything new here? This still is broken

JanCantCode avatar Jun 19 '25 13:06 JanCantCode

Image

This server is running Folia version 1.21.4-DEV-ver/1.21.5@8af1aef (2025-06-19T18:15:22Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)

Image

TechnicallyCoded avatar Jun 19 '25 18:06 TechnicallyCoded

Cannot reproduce on the latest release & same commit hash

TechnicallyCoded avatar Jun 19 '25 18:06 TechnicallyCoded

Cannot reproduce on the latest release & same commit hash

i'm still having the same issue even with the new jar downloaded from paper

https://papermc.io/downloads/folia 1.21.8 build 5 (06a99a637b3bfc1a2ea1b6788869bb130704daf43215c8a69cf70bf1361f4b21)

but what i still don't get is that you use a check with the RegionizedServer class to get if it is folia, and this class is not present in the folia javadoc, in fact if i add somthing like

public static boolean isFolia() { try { Class.forName("io.papermc.paper.threadedregions.RegionizedServer"); return true; } catch (ClassNotFoundException e) { return false; } }

it returns false.

https://jd.papermc.io/folia/1.21/io/papermc/paper/threadedregions/package-summary.html

xF3d33 avatar Sep 12 '25 20:09 xF3d33

This class check was recommended by one of the Paper Team developers back in 1.19. It has worked reliably for me since then on multiple Folia servers that I worked on first-hand, including forked versions. I have very recent accounts from other developers saying that Folia is detected without issues including on 1.21.8. And you are the only case, that I know of, who has this issue so far. Idk when to say, but when I tested the exact commit hash, the lib successfully ran. There must be something difference about your execution environment? JVM distribution? Operating system? I have no idea.

TechnicallyCoded avatar Sep 13 '25 22:09 TechnicallyCoded

If possible, could you send me a full copy of a dev server for which this check fails. I would upload it as-is within a generic Dockerized container. A zip file with everything from folia jar, config, plugins, and libraries would be best.

TechnicallyCoded avatar Sep 13 '25 23:09 TechnicallyCoded

If possible, could you send me a full copy of a dev server for which this check fails. I would upload it as-is within a generic Dockerized container. A zip file with everything from folia jar, config, plugins, and libraries would be best.

To check i have just downloaded the latest folia build from papermc and used that lines of code. if you do the same does it work for you? or does it returns false?

xF3d33 avatar Sep 13 '25 23:09 xF3d33

I have even tried from different PCs

xF3d33 avatar Sep 13 '25 23:09 xF3d33

i've actually fixed this. it was caused on how i was shading stuffs.

xF3d33 avatar Sep 14 '25 05:09 xF3d33