About ONNX Lib
ONNX Lib is a standalone library mod for NeoForge (1.21.1+) that bundles Microsoft ONNX Runtime (1.19.2) into the game's classpath.
It allows AI-driven Minecraft mods (such as Naruto: New Shinobi Era) to run neural network inference natively in Java without bloating every mod update with ~50 MB of native binaries.
Features
- Cross-Platform Native Support: Includes pre-packaged ONNX Runtime binaries for Windows (x64, ARM64), Linux (x64, ARM64), and macOS (Intel & Apple Silicon).
- Zero Configuration for Players: Just drop the
.jarinto yourmodsfolder alongside any mod that requires it. - Fast CPU Inference: Enables real-time neural network decision-making for entities and combat AI with minimal overhead.
For Mod Developers
If you want to use ai.onnxruntime.* in your NeoForge 1.21.1 (21.1.240+) mod without bundling it via jarJar:
- Add
onnx_libas a required dependency in yourneoforge.mods.toml:
[[dependencies.your_mod_id]]
modId="onnx_lib"
type="required"
versionRange="[1.0.0,)"
ordering="BEFORE"
side="BOTH"

