Skip to content

NilKit API v4.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Aug 09:39
· 3 commits to main since this release

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.