Skip to content

Refactor native directory handling in Rapier3D#1016

Open
qurle wants to merge 6 commits into
ryanhcode:mainfrom
qurle:patch-1
Open

Refactor native directory handling in Rapier3D#1016
qurle wants to merge 6 commits into
ryanhcode:mainfrom
qurle:patch-1

Conversation

@qurle
Copy link
Copy Markdown

@qurle qurle commented May 23, 2026

Reasoning

I figured out that Rapier-related world join crashes on Apple Silicon Macs are caused by error in path resolving.

With this fix, Sable tries to place Rapier natives in <modpack>/.sable/ folder and fallbacks to user root directory: %userprofile%/.sable/ on Windows, ~/.sable/ on Mac and Linux.

Result

Now Sable works on my Mac M2 Pro (and all depending mods are working too).
Closes #934, closes #947.
Probable closes #743, closes #864

Testing

I tested the build on Fabric (Sable alone) and NeoForge (Sable alone and also alongside 35 other mods including Create and Create Aeronautics):

Tested

  • Windows x86 (Intel)
  • MacOS ARM (M2 Pro)

Not tested

  • Windows ARM
  • MacOS x86 (Intel)
  • Linux x86
  • Linux ARM

NeoForge: sable-neoforge-1.21.1-1.2.2.jar
Fabric: sable-fabric-1.21.1-1.2.2.jar

It tries to place Rapier natives in `../.sable/` folder and fallbacks to user root directory (`%userprofile%/.sable` on Windows, `~/.sable/` on Mac or Linux)
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 23, 2026

CLA assistant check
All committers have signed the CLA.

@qurle
Copy link
Copy Markdown
Author

qurle commented May 23, 2026

ARM Mac is fine. I’ll check x86 Windows by tomorrow.

ARM Windows, x86 Mac and Linux are waiting to be tested.

@IThundxr
Copy link
Copy Markdown
Collaborator

The better solution would be to use FMLPaths.GAMEDIR.get() on forge, and FabricLoader.getInstance().getGameDir() on fabric, the paths returned by those methods are absolute so using resolve on them will make sure that the paths are actually correct, and also will fix issues when users are using ATLauncher as ATLauncher stores all the instances in the .app

@D-a-t-D-u-d-e
Copy link
Copy Markdown

It works! Thanks qurle.

@qurle qurle marked this pull request as draft May 24, 2026 14:41
@qurle qurle marked this pull request as ready for review May 24, 2026 16:55
@qurle
Copy link
Copy Markdown
Author

qurle commented May 24, 2026

The better solution would be to use FMLPaths.GAMEDIR.get() on forge, and FabricLoader.getInstance().getGameDir() on fabric

@IThundxr, thanks, that was a great idea. I implemented it and actally got .sable folder back in launcher directory, and it works perfectly.

@qurle
Copy link
Copy Markdown
Author

qurle commented May 24, 2026

Sorry for insane amount of commits, it’s kinda my first experience in mods and I haven’t touch Java for years

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants