NativeLoader
by Mliybs
NativeLoader lets Fabric mods load code written in languages that compile to native code, such as C++ or C#, which can then modify the game.
What it does
NativeLoader is a compatibility-layer Fabric mod that runs native libraries alongside Minecraft. It is built to modify game content in languages other than Java and Kotlin, and it reaches native code through JNI and JNA. The mod itself only handles calling native code and supplies wrapper classes for changing the game, so any content that needs another language has to be compiled to a dll, so or dylib file by its author.
Native code is placed in a nativepacks folder inside the game directory, using a resource package with the assets/<namespace>/natives path. The folder does not have to exist beforehand, since the game creates it on first launch. Once the library is in place, the game loads the dll, so or dylib files from those namespaces when it starts, and the code inside can then see and change the game. The mod is in its development phase with basic functionality complete, and the project accepts outside contributions.
Key features
Native code via JNI and JNA
Native libraries are called through JNI and JNA, which give native code room to work with the game.
Languages beyond Java
Native code written in languages such as C++ or C# can be used to change game content, where Java and Kotlin mods are not involved.
Namespaced native packs
Libraries are loaded from resource packs by namespace, so each content package keeps its own native files.
Low overhead
The bridge between Java and native code aims to keep the performance cost small.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Native mod content
A content author compiles a dll, so or dylib that changes the game and publishes it inside a resource package for players to add.
Integrating native libraries
A developer wants existing native code to take part in game logic and uses the wrapper classes to reach it from the game.
Who it’s for: Mod developers who write native code in C++, C#, or similar languages, and content authors who want to publish native libraries for Minecraft 1.20.4 – 1.20.6.
Questions
Does NativeLoader require Fabric API?
Does NativeLoader have to be installed on the server?
Can Mixin be used to add native features?
Where is the source code kept?
In the catalog
NativeLoader is one of 29,952 Game mechanics mods on ModsFinder, and one of 19,630 Game mechanics mods for Fabric. 11,154 mods support Minecraft 1.20.6.
Similar mods
What the author says
NativeLoader is a compatibility-layer Fabric mod designed to modify game content in languages that can be compiled to native code except Java or Kotlin. It interacts with native code via JNI and JNA, giving native code enough flexibility and minimizing performance overhead. NativeLoader itself is only responsible for…
Official listing
- Modrinth page
- modrinth.com/mod/nativeloader
- Owner
- Mliybs
- Published
- 2024-11-26
- Updated on Modrinth
- 2025-01-25
- Facts verified
- 2026-10-15
