|
| 1 | +# NilLoaderSDK |
| 2 | + |
| 3 | +NilLoaderSDK is a Java 8 utility SDK for NilLoader-based Minecraft mods (legacy versions such as 1.4.7). |
| 4 | + |
| 5 | +It provides: |
| 6 | +- metadata helpers for NilLoader + KDL |
| 7 | +- runtime bootstrap for KDL-only mods |
| 8 | +- reflection/remapping helpers |
| 9 | +- event bus and lifecycle events |
| 10 | +- NIO networking utilities |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## Why NilLoaderSDK? |
| 15 | + |
| 16 | +NilLoaderSDK is not only metadata tooling. It is a practical utility layer for legacy NilLoader mod development, with reusable APIs that reduce boilerplate and speed up feature development. |
| 17 | + |
| 18 | +Use it when you want a single toolkit for lifecycle dispatching, reflection/remapping, networking, event handling, and modernized metadata support. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## Key Features |
| 23 | + |
| 24 | +- **Lifecycle + Entrypoint system** |
| 25 | + - `premain` / `hijack` dispatching via ServiceLoader, JVM properties, and properties file |
| 26 | + - Default SDK modules for centralized startup flow |
| 27 | +- **Event bus for mod architecture** |
| 28 | + - Lightweight event system with cancellable events and priority ordering |
| 29 | + - Lifecycle events for pre/post entrypoint dispatch hooks |
| 30 | +- **Networking stack (Java NIO)** |
| 31 | + - Client/server implementations with packet registry and codec |
| 32 | + - Optional auto-network bridge for fast integration |
| 33 | +- **Reflection + remapping helpers** |
| 34 | + - Utilities for interacting with obfuscated legacy internals safely and repeatedly |
| 35 | +- **Metadata bridge (CSS + KDL)** |
| 36 | + - Supports `.nilmod.css` and `.nilsdkmod.kdl` |
| 37 | + - KDL-only runtime bootstrap for SDK-aware mods when root CSS is absent |
| 38 | + - Dependency policy support (`requires`, `safeload`, load order hints) |
| 39 | +- **Diagnostics for pack/mod developers** |
| 40 | + - Verbose bootstrap pipeline logs |
| 41 | + - Loaded-mod table output: |
| 42 | + - `ID | Name | Version | Authors | License` |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Metadata Example (`.nilsdkmod.kdl`) |
| 47 | + |
| 48 | +```kdl |
| 49 | +nilmod { |
| 50 | + name "My Mod" |
| 51 | + description "Example mod" |
| 52 | + authors "Author" |
| 53 | + version "1.0.0" |
| 54 | +} |
| 55 | +
|
| 56 | +entrypoints { |
| 57 | + premain "com.example.MyPremain" |
| 58 | + hijack "com.example.MyHijack" |
| 59 | +} |
| 60 | +
|
| 61 | +nilloadersdk { |
| 62 | + requires "nilloader" "nilloadersdk" |
| 63 | + load_after "nilloadersdk" |
| 64 | + icon "assets/mymod/icon.png" |
| 65 | + modurl "https://modrinth.com/mod/my-mod" |
| 66 | + sourceurl "https://github.com/example/my-mod" |
| 67 | + license "MIT" |
| 68 | + credits "Author" |
| 69 | +} |
| 70 | +``` |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## Dependency (Gradle) |
| 75 | + |
| 76 | +```gradle |
| 77 | +repositories { |
| 78 | + maven { url "https://repo.tamkungz.me" } |
| 79 | +} |
| 80 | +
|
| 81 | +dependencies { |
| 82 | + implementation "me.tamkungz.nilloadersdk:nilloadersdk:2.0.1" |
| 83 | +} |
| 84 | +``` |
| 85 | + |
| 86 | +Repository: [https://repo.tamkungz.me](https://repo.tamkungz.me) |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Keywords (for search) |
| 91 | + |
| 92 | +NilLoader, NilLoaderSDK, Minecraft 1.4.7, legacy Minecraft modding, Java 8 modding, entrypoint framework, event bus, NIO networking, reflection helper, remapping tools, KDL metadata, nilmod SDK. |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## License |
| 97 | + |
| 98 | +Licensed under **LGPL-3.0-or-later**. |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Credits |
| 103 | + |
| 104 | +- [NilLoader (official)](https://git.sleeping.town/Nil/NilLoader) |
| 105 | +- [NilLoader (mirror)](https://github.com/exaskye/NilLoader) |
0 commit comments