SigmundGranaas / forgero

Tool creation and customization mod for Minecraft
MIT License
48 stars 15 forks source link

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

Closed Hexicube closed 17 hours ago

Hexicube commented 1 day ago

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.

SigmundGranaas commented 1 day ago

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 :+1:

Hexicube commented 17 hours ago

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.