
NilLoaderSDK API
Utilities and helper SDK for NilLoader mod development. The purpose is to make developing older versions of Minecraft easier.
58
0
NilLoaderSDK API 2.0.1
release8 апреля 2026 г.CHANGE
All notable changes to this project will be documented in this file.
[2.0.1] - 2026-04-08
Added
- Added SDK runtime bootstrap for KDL-only mods (archives with
.nilsdkmod.kdlbut no root*.nilmod.css). - Added
KdlOnlyModBootstrapperto discover/inject such mods frommods/andnilmods/during SDK premain. - Added verbose bootstrap diagnostics for KDL-only loading flow (candidate scan, KDL entry detection, metadata parse status, classpath injection, premain invocation).
- Added formatted loaded-mod summary table log:
ID | Name | Version | Authors | License
Changed
- Bumped SDK version to
2.0.1in build and metadata resources. DefaultSdkEntrypointModulenow runs KDL-only bootstrap before dependency enforcement.
Fixed
- Fixed KDL parser newline/block handling in nested sections, resolving
KdlParseExceptionduring valid.nilsdkmod.kdlparsing. - Improved metadata text decoding for runtime reads (UTF-8/UTF-16 BOM and UTF-16 heuristic fallback) in bridge and SDK metadata IO.
- Fixed KDL-only metadata resolution so injected mods now correctly expose
name,version, andentrypointsinstead of fallback?values.
NilLoaderSDK API 2.0.0
release8 апреля 2026 г.CHANGE
All notable changes to this project will be documented in this file.
[2.0.0] - 2026-04-08
Added
- Introduced KDL support as a first-class metadata layer in
2.0.0.- Prior to
2.0.0, mods relied on NilLoader CSS metadata only (*.nilmod.css). 2.0.0adds SDK KDL metadata (*.nilsdkmod.kdl) and runtime bridge integration.
- Prior to
- Introduced a general-purpose KDL toolkit for broad SDK usage (not metadata-only):
KdlParser,KdlWriterKdlDocument,KdlNode,KdlValue,KdlParseException- Can be used by any system/module that needs KDL parsing/serialization.
NilLoaderHelperconvenience APIs for easier multi-mod integration and diagnostics:isAllModsLoaded(String...)getFirstLoadedMod(String...)getEntrypoints(String)hasEntrypoint(String, String)getModsWithEntrypoint(String)hasMissingRequiredMods(String)getMissingRequiredModsForLoadedMods()getModsRequiring(String)
- Forge/Fabric-like event architecture for easier mod development:
- Global SDK access point:
NilLoaderSDK - Event primitives:
Event,CancellableEvent,EventPriority,SubscribeEvent - Central
EventBuswith:- annotation listener registration (
@SubscribeEvent) - typed callback registration (
listenstyle) - cancellation-aware dispatch flow
- annotation listener registration (
- Lifecycle events:
PreEntrypointDispatchEvent(cancellable)PhaseEventPostEntrypointDispatchEvent
- Entrypoint dispatcher now emits lifecycle events around phase execution.
NilModBasenow includes convenience methods to register/post/listen events.
- Global SDK access point:
- SDK KDL metadata schema expanded with richer mod info fields:
modurlsourceurllicensecredits(multi-value)
Changed
- Bumped SDK version to
2.0.0in build and metadata resources. NilMetadataBridgenow parses.nilsdkmod.kdlvia shared KDL parser (KdlParser) instead of manual string parsing for better compatibility.- KDL metadata merge now supports both section blocks (
nilmod {},entrypoints {}) and top-level fallback keys (name,description,authors,version,entrypoints.<phase>).
Fixed
- Removed inconsistent changelog carry-over for
1.0.4under2.0.0.
Notes
- New helper methods are Java 8 compatible and return immutable collections where applicable.
- Focus of this update is DX (developer experience): reduce repetitive NilLoader metadata and dependency-check boilerplate in mods.
- Backward compatibility remains intact: CSS metadata stays primary, and KDL is additive for SDK-aware features.
NilLoaderSDK API 1.0.3
release6 апреля 2026 г.CHANGE
All notable changes to this project will be documented in this file.
[1.0.3] - 2026-03-26
Changed
- Bumped SDK version to
1.0.3in build and metadata resources. - KDL metadata parser remains custom/in-project (Java 8 compatible), without external KDL dependency.
Added
- SDK-only metadata model and IO:
SdkModMetadataSdkMetadataKdlSdkMetadataIO
- Runtime metadata bridge in SDK:
NilMetadataBridgeNilMetadataPatchInstaller- Patches
NilMetadata.fromduring premain to merge CSS + KDL automatically.
- New SDK metadata resource source-of-truth:
src/main/resources/nilloadersdk.nilsdkmod.kdl. NilLoaderHelperSDK metadata APIs:getSdkMetadata(String)/getSdkMetadata(NilMetadata)getMissingRequiredMods(String)areRequiredModsLoaded(String)getLoadBefore(String)getLoadAfter(String)getIconPath(String)getLoadedModIcons()getRequiredMods(String)isSafeLoad(String)
Notes
- SDK-only metadata is separated from NilLoader base metadata for compatibility.
- SDK metadata default file is now
.nilsdkmod.kdl(legacy.kdlnames are still readable). - Merge policy: CSS is primary; KDL only fills missing metadata fields.
- No per-mod custom Gradle metadata-generation step required.
- Dependency enforcement:
- Missing required mods +
safeload=true-> warn log - Missing required mods +
safeload=false-> error and stop startup
- Missing required mods +
- If SDK is not installed, NilLoader still reads only original
*.nilmod.cssand continues to work normally.
NilLoaderSDK API 1.0.2
release23 марта 2026 г.CHANGE
All notable changes to this project will be documented in this file.
[1.0.2] - 2026-03-24
Added
- New helper:
NilLoaderHelperinme.tamkungz.nilloadersdk.helper. - Convenience APIs for NilLoader metadata and loaded-mod checks:
isModLoaded,isAnyModLoadedgetModMetadata,getModMetadataOrNull,getAllLoadedModsgetLoadedModIds,getLoadedModNames,getLoadedModsByIdgetSourceFile,getEntrypointNames,getEntrypointClass,describeMod
- New helper:
TransformerHelperinme.tamkungz.nilloadersdk.helper. - Java-agent style class patch registration via NilLoader transformer pipeline (no Mixin required):
registerBytecodePatchfor raw byte[] transformsregisterAsmPatchfor ASMClassNodetransforms- class-name normalization utilities for internal slash format
Changed
SimpleRemap.forVersion("1.4.7")preserves manual mappings frombuild147()as higher priority.- External SRG (
.remapping/1.4.7/mcp2obf.srg) is used only to fill missing entries, not overwrite existingbuild147()mappings. SimpleRemap.forVersion(version)can load remap for versions that provide local.remapping/<version>/mcp2obf.srg.
Packaging
- SRG files are not bundled into the built JAR.
- Build now auto-generates
GeneratedSrgMappingsfrom local.remapping/*/mcp2obf.srgand embeds only the extracted mappings used by SDK remap calls. - Runtime loads generated mappings first via
SimpleRemap, then keeps fallback behavior for local development.
Notes
.remappingis not bundled in the repository contents.- If you want to build and use remapping locally, prepare/provide your own
.remappingdirectory.
Docs
- README helper section now includes
NilLoaderHelperand summarizes key API groups. - README now documents class patching usage through
TransformerHelperand phase timing notes (premain/hijack).
NilLoaderSDK API 1.0.1
release21 марта 2026 г.CHANGE
All notable changes to this project will be documented in this file.
[1.0.1] - 2026-03-22
Added
- Configurable logging root namespace in
Loggers. - New APIs:
setRoot(String),getRoot(), andresetRoot(). - Per-mod/per-class explicit APIs:
sdk(String),forMod(String),forClass(String, Class<?>), andforModClass(String, Class<?>).
Changed
sdk()andforClass(Class<?>)continue to work with global fallback root.- Multi-mod usage is now supported via explicit-root APIs so roots like
A/...andB/...can coexist. - Logging root defaults to
DEFAULT_ROOTand safely falls back when blank/null is provided.
Совместимость
Minecraft: Java Edition
1.7.x1.6.x1.5.x1.4.x1.3.x
Платформы
Поддерживаемые окружения
Клиент и сервер
Ссылки
Создатели
Детали
Лицензия:LGPL-3.0-only
Опубликован:1 месяц назад
Обновлён:3 недели назад
