Forgero - [Fabric]

Forgero - [Fabric]

85k Downloads

FabricPackFinder.java:L12 (PACK_LOCATION) should be a relative path

Hexicube opened this issue ยท 5 comments

commented

The "/data/forgero/packs/" declaration should have the leading slash removed to instead read "data/forgero/packs/", the leading slash causes it to resolve as an absolute path breaking development of mods that want to implement this as they would have to build a .jar to test any changes.

commented

The pack location issue has been an issue for a long time, and is likely the issue that the mod does not load resources using the generated runtime configs, and only via Gradle.

Anyway, its nice you highlighted it so I should probably get that sorted out ๐Ÿ‘

commented

The fix won't properly work on Linux, paths all start with a slash for the root install folder of the OS unlike Windows where you have the drive letter.

You instead need to look at the ModContainer and check rootPaths() to see if the path is exactly just a slash (root directory of a jar) or not. This can theoretically still fail if someone decides the root of their OS is where they'll put a mod data folder but that should never happen in practice.

commented

Yeah I noticed that too when i tried using the forgero example mod. Have tested it now with #1130 and it should resolve the issue. At least on Linux. I haven't tested it on Windows, but I assume it will be fine.

commented

I think this will need testing on Windows since absolute paths there don't start with a slash (which is being checked for), when I was checking what paths were being fed in my paths were absolute paths from my actual OS root directory (not the classloader root) so I suspect the check will fail.

commented

I will see how it works out once I get the windows setup back up and running.