Skip to content

Releases: NilKitAPI/NilKit-API

NilKit API v4.1.0

Choose a tag to compare

@github-actions github-actions released this 06 Aug 09:39

Byte Buddy patching framework

  • Expanded the Byte Buddy integration from a thin helper wrapper into a reusable patching framework designed for Mixin-style runtime transformations.
  • Added ByteBuddyPatch as a declarative patch definition API for targeting classes and applying multiple transformations without manually recreating AgentBuilder or transformer boilerplate.
  • Added ByteBuddyPatchRegistry for managing multiple patches with deterministic ordering and configurable priorities.
  • Added JVM descriptor-based method matching for more reliable targeting across mapped, obfuscated, and legacy Minecraft environments.
  • Added patch validation through require(...), allowing transformations to fail immediately when an expected method or target is missing instead of silently continuing with an unapplied patch.
  • Added reusable Advice-based injection support for method entry, method exit, constructors, argument modification, return-value modification, and exception handling.
  • Added support for replacing complete method implementations through direct Byte Buddy interception.
  • Added low-level transformation access through mutate(...), allowing patches to use raw Byte Buddy features such as MemberSubstitution, ASM visitors, field/method definitions, implemented interfaces, and custom builder mutations.
  • Kept the underlying Byte Buddy API exposed so advanced transformations are not restricted by the higher-level NilKit abstraction.

Runtime transformation

  • Added optional Instrumentation-based installation with retransformation support for environments where already-loaded classes must be patched.
  • Added composition support so multiple independent patches can safely target the same class through a single transformation pipeline.
  • Improved transformation diagnostics and failure behavior for incompatible targets, incorrect mappings, and changed method descriptors.

Documentation

  • Added documentation and examples for using the Byte Buddy patch API as a Mixin-style transformation layer.
  • Documented patch registration, priorities, required targets, Advice injection, full method interception, and advanced raw Byte Buddy mutations.

NilKit API v4.0.0

Choose a tag to compare

@github-actions github-actions released this 06 Aug 08:17

Refactor

Legacy v3.0.1

Choose a tag to compare

@github-actions github-actions released this 05 Aug 06:43

[3.0.1] - 2026-08-05

Compatibility

  • Removed the SDK's hard bytecode link to net.minecraft.client.Minecraft; McHelper now resolves the mapped Minecraft class lazily through reflection only when Minecraft-specific helpers are called.
  • Removed the compile-time game / jarmod Minecraft 1.4.7 dependencies from the SDK build. The core artifact no longer needs a Minecraft JAR to compile.
  • Removed unused external ASM 9.5 runtime dependencies; transformer helpers already use the loader's shaded ASM API, avoiding unnecessary ASM classpath conflicts in -all.jar.
  • MinecraftAutoNetworkBridge no longer assumes Minecraft 1.4.7. When explicitly enabled it reads -D[sdk].minecraft.version=<version> and disables itself safely if the version or mappings are unavailable.
  • Added regression coverage that rejects hard net.minecraft.* type references in the Minecraft-facing SDK classes.

Mapping workflow

  • Removed the .remapping staging workflow. tools/MinecraftRemapping is now the single source path for mapping data.
  • Gradle mapping generation reads tools/MinecraftRemapping/<version>/mcp2obf.srg directly from the pinned submodule.
  • Fixed SimpleRemap so release JARs actually consume the generated mapping subset; 3.0.0 generated GeneratedSrgMappings but never called it.
  • Replaced prepareRemapping / import-submodule with direct inspectMinecraftRemapping, inspect-submodule, and submodule-path workflows.
  • Updated gen_srg_mappings.py to use project-relative paths instead of a machine-specific absolute Windows path.

Build fixes

  • Removed duplicate declarations accidentally left in build.gradle 3.0.0 mapping-generation code.

Legacy v2.1.0

Choose a tag to compare

@TamKungZ TamKungZ released this 05 Aug 04:16

[2.1.0] - 2026-08-05

Added

  • Added project-local Maven publishing to ./maven via publishProjectLocal; publications are OpenPGP-signed with the user's normal GnuPG / gpg-agent setup.
  • Added inherited event-listener discovery, typed-listener unregistration, and event-bus clearing APIs.
  • Added cooldown remaining-time queries and expired-player cleanup.
  • Added NIO client/server state inspection (isRunning, isConnected, connection snapshots/counts) and server bound-port lookup.
  • Added default listener hooks for unknown packet IDs and exhausted client reconnect attempts without breaking existing listener implementations.
  • Added packet-registry inspection helpers (isRegistered, size, clear).
  • Added lifecycle controls/state for the automatic Minecraft network bridge, including explicit stop() and automatic recovery after reconnect exhaustion.
  • Added regression tests for KDL, cooldown concurrency, and packet codec/registry behavior.

Changed

  • Normal build no longer forces loader decompilation; decompileLoader remains an explicit developer task.
  • KDL scalar output now uses KDL 2 forms (#true, #false, #null, #inf, #-inf, #nan).
  • KDL parsing now accepts common KDL 2 numeric forms, raw strings, quoted property keys, dotted identifiers, nested block comments, and slash-dash node/entry suppression while retaining legacy boolean/null compatibility.
  • Event registration is de-duplicated, scans inherited subscriber methods, and preserves deterministic registration order for equal-priority handlers.
  • Network listener callback failures are isolated from the selector loop; packet serialization failures no longer disconnect healthy peers.
  • Network constructor and packet-registry inputs are validated early with clearer errors.

Fixed

  • Fixed TargetFinder returning a nearby player that failed the requested minDot aim threshold and fixed target ranking to prefer alignment with distance as the tie-breaker.
  • Fixed CooldownTracker.tryUseGlobal / tryUsePlayer race conditions so a cooldown window cannot be consumed concurrently by multiple callers.
  • Fixed entrypoint phase re-entrancy during the pre-dispatch event by installing the active-phase guard before posting the event.
  • Fixed NIO server duplicate disconnect callbacks and stale connection entries.
  • Fixed NIO client reconnect attempts terminating permanently when opening a replacement channel throws immediately or when a non-blocking connect completes immediately.
  • Fixed KDL writer/parser round-trip failures for quoted property keys and KDL 2 scalar values.
  • Fixed zero/invalid look-vector and negative-range edge cases in TargetFinder.
  • Fixed ReflectHelper.invoke contradicting its documented null-to-primitive-default behavior.
  • Fixed automatic network bridge getting stuck with a dead client after reconnect exhaustion.
  • Fixed local SRG mapping reads using platform-default encoding and added clearer version validation.

Legacy v2.0.1

Choose a tag to compare

@TamKungZ TamKungZ released this 08 Apr 12:46

[2.0.1] - 2026-04-08

Added

  • Added SDK runtime bootstrap for KDL-only mods (archives with .sdkmod.kdl but no root *.mod.css).
  • Added KdlOnlyModBootstrapper to discover/inject such mods from mods/ and [loader]mods/ 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.1 in build and metadata resources.
  • DefaultSdkEntrypointModule now runs KDL-only bootstrap before dependency enforcement.

Fixed

  • Fixed KDL parser newline/block handling in nested sections, resolving KdlParseException during valid .sdkmod.kdl parsing.
  • 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, and entrypoints instead of fallback ? values.

Legacy v2.0.0

Choose a tag to compare

@TamKungZ TamKungZ released this 08 Apr 10:55

[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 the loader's CSS metadata only (*.mod.css).
    • 2.0.0 adds SDK KDL metadata (*.sdkmod.kdl) and runtime bridge integration.
  • Introduced a general-purpose KDL toolkit for broad SDK usage (not metadata-only):
    • KdlParser, KdlWriter
    • KdlDocument, KdlNode, KdlValue, KdlParseException
    • Can be used by any system/module that needs KDL parsing/serialization.
  • LoaderHelper convenience 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: [SDK]
    • Event primitives: Event, CancellableEvent, EventPriority, SubscribeEvent
    • Central EventBus with:
      • annotation listener registration (@SubscribeEvent)
      • typed callback registration (listen style)
      • cancellation-aware dispatch flow
    • Lifecycle events:
      • PreEntrypointDispatchEvent (cancellable)
      • PhaseEvent
      • PostEntrypointDispatchEvent
    • Entrypoint dispatcher now emits lifecycle events around phase execution.
    • ModBase now includes convenience methods to register/post/listen events.
  • SDK KDL metadata schema expanded with richer mod info fields:
    • modurl
    • sourceurl
    • license
    • credits (multi-value)

Changed

  • Bumped SDK version to 2.0.0 in build and metadata resources.
  • MetadataBridge now parses .sdkmod.kdl via shared KDL parser (KdlParser) instead of manual string parsing for better compatibility.
  • KDL metadata merge now supports both section blocks (mod {}, entrypoints {}) and top-level fallback keys (name, description, authors, version, entrypoints.<phase>).

Fixed

  • Removed inconsistent changelog carry-over for 1.0.4 under 2.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 loader metadata and dependency-check boilerplate in mods.
  • Backward compatibility remains intact: CSS metadata stays primary, and KDL is additive for SDK-aware features.

Legacy v1.0.3

Choose a tag to compare

@TamKungZ TamKungZ released this 26 Mar 08:55

[1.0.3] - 2026-03-26

Changed

  • Bumped SDK version to 1.0.3 in 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:
    • SdkModMetadata
    • SdkMetadataKdl
    • SdkMetadataIO
  • Runtime metadata bridge in SDK:
    • MetadataBridge
    • MetadataPatchInstaller
    • Patches Metadata.from during premain to merge CSS + KDL automatically.
  • New SDK metadata resource source-of-truth: src/main/resources/[sdk].sdkmod.kdl.
  • LoaderHelper SDK metadata APIs:
    • getSdkMetadata(String) / getSdkMetadata(Metadata)
    • getMissingRequiredMods(String)
    • areRequiredModsLoaded(String)
    • getLoadBefore(String)
    • getLoadAfter(String)
    • getIconPath(String)
    • getLoadedModIcons()
    • getRequiredMods(String)
    • isSafeLoad(String)

Notes

  • SDK-only metadata is separated from the loader's base metadata for compatibility.
  • SDK metadata default file is now .sdkmod.kdl (legacy .kdl names 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
  • If SDK is not installed, the base loader still reads only original *.mod.css and continues to work normally.

Legacy v1.0.2

Choose a tag to compare

@TamKungZ TamKungZ released this 23 Mar 18:17

[1.0.2] - 2026-03-24

Added

  • New helper: LoaderHelper in me.tamkungz.[sdk].helper.
  • Convenience APIs for loader metadata and loaded-mod checks:
    • isModLoaded, isAnyModLoaded
    • getModMetadata, getModMetadataOrNull, getAllLoadedMods
    • getLoadedModIds, getLoadedModNames, getLoadedModsById
    • getSourceFile, getEntrypointNames, getEntrypointClass, describeMod
  • New helper: TransformerHelper in me.tamkungz.[sdk].helper.
  • Java-agent style class patch registration via the loader's transformer pipeline (no Mixin required):
    • registerBytecodePatch for raw byte[] transforms
    • registerAsmPatch for ASM ClassNode transforms
    • class-name normalization utilities for internal slash format

Changed

  • SimpleRemap.forVersion("1.4.7") preserves manual mappings from build147() as higher priority.
  • External SRG (.remapping/1.4.7/mcp2obf.srg) is used only to fill missing entries, not overwrite existing build147() 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 GeneratedSrgMappings from local .remapping/*/mcp2obf.srg and 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

  • .remapping is not bundled in the repository contents.
  • If you want to build and use remapping locally, prepare/provide your own .remapping directory.

Docs

  • README helper section now includes LoaderHelper and summarizes key API groups.
  • README now documents class patching usage through TransformerHelper and phase timing notes (premain / hijack).

Legacy v1.0.1

Choose a tag to compare

@TamKungZ TamKungZ released this 21 Mar 20:35

[1.0.1] - 2026-03-22

Added

  • Configurable logging root namespace in Loggers.
  • New APIs: setRoot(String), getRoot(), and resetRoot().
  • Per-mod/per-class explicit APIs: sdk(String), forMod(String), forClass(String, Class<?>), and forModClass(String, Class<?>).

Changed

  • sdk() and forClass(Class<?>) continue to work with global fallback root.
  • Multi-mod usage is now supported via explicit-root APIs so roots like A/... and B/... can coexist.
  • Logging root defaults to DEFAULT_ROOT and safely falls back when blank/null is provided.

Legacy v1.0.0

Choose a tag to compare

@TamKungZ TamKungZ released this 21 Mar 20:33

[1.0.0] - 2026-03-22

Added

  • Initial public release of the SDK.
  • Core SDK base for loader mods via ModBase.
  • Entrypoint framework with phase dispatching (premain, hijack) and recursion safeguards.
  • Helper utilities for reflection, Minecraft internals, packet handling, and proxy behaviors.
  • Utility classes including target resolution and cooldown tracking.
  • Java NIO networking stack with client/server, codec, packet registry, and bridge utilities.
  • Remapping support through SimpleRemap.
  • Standardized logging API through Loggers.
  • Example modules and loader metadata resources.
  • Maven publishing configuration and source/javadoc artifacts.

Build/Tooling

  • Gradle-based build with Java toolchain (Java 8).
  • Loader Gradle plugin integration for loader workflows.
  • Shadow plugin configured for packaging.
  • Optional decompilation task for loader dependency inspection.

Notes

  • This is the first changelog entry for the project.