A library mod you depend on goes from 1.4.2 to 2.0.0. The changelog says "cleaned up the registry API". Your addon still compiles in your head. Then a player sends you a NoSuchMethodError from the launcher log.
The question you need answered before you bump the version is: what changed in the public API, and which of my methods touch it? You can answer both from the jar files, with no IDE project and no decompiling by hand, using jdx, an open-source CLI (and MCP server) that reads Java/Kotlin bytecode.
Everything below was run with jdx 1.8.6 (the latest release) on small fixture jars: relicapi-1.4.2.jar, relicapi-2.0.0.jar (a made-up library mod with a fabric.mod.json), and mods/relicbags-1.1.0.jar, an addon compiled against 1.4.2. The output is pasted exactly as printed.
curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh | bash # Windows: irm https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.ps1 | iex # needs JDK 21+ Step 1: diff the two mod jars
$ jdx diff relicapi-1.4.2.jar relicapi-2.0.0.jar api diff relicapi-1.4.2.jar -> relicapi-2.0.0.jar (public surface) breaking TYPE_MADE_FINAL com.example.relicapi.api.RelicSlot breaking MEMBER_REMOVED com.example.relicapi.api.RelicRegistry#register(java.lang.String, com.example.relicapi.api.Relic) breaking MEMBER_REMOVED com.example.relicapi.api.RelicSlot#index breaking ABSTRACT_ADDED com.example.relicapi.api.Relic#isCursed() breaking RETURN_TYPE_CHANGED com.example.relicapi.api.Relic#getCooldownTicks(): int -> long breaking RETURN_TYPE_CHANGED com.example.relicapi.api.RelicRegistry#get(java.lang.String): com.example.relicapi.api.Relic -> java.util.Optional info MEMBER_ADDED com.example.relicapi.api.Relic#tier() info MEMBER_ADDED com.example.relicapi.api.RelicRegistry#register(java.lang.String, java.lang.String, com.example.relicapi.api.Relic) info MEMBER_ADDED com.example.relicapi.api.RelicSlot#index() info FIELD_CONSTANT_VALUE_CHANGED com.example.relicapi.api.RelicSlot#MAX_SLOTS: 4 -> 6 6 breaking 路 0 suspicious 路 4 informational 路 0 types added 路 0 types removed source: relicapi-1.4.2.jar (bytecode) source: relicapi-2.0.0.jar (bytecode) next: jdx members com.example.relicapi.api.RelicSlot Some notes for modders:
- The most breaking findings come first. Each line names one rule (
MEMBER_REMOVED,RETURN_TYPE_CHANGED,ABSTRACT_ADDED, ...), so you can filter by rule instead of matching on text. - A changed return type breaks binary compatibility. The JVM links a call by its full descriptor, so
getCooldownTicks()IandgetCooldownTicks()Jare different methods. An addon built against 1.4.2 gets aNoSuchMethodErrorat runtime even though the source looks almost the same. -
ABSTRACT_ADDEDon an interface means every addon class that implementsRelicwithout the new method throwsAbstractMethodErrorwhen the game calls it. -
FIELD_CONSTANT_VALUE_CHANGEDis only informational, but it is easy to miss.static finalconstants are inlined at compile time, so an addon built against 1.4.2 keeps using4until you recompile it. - The ref on each line is already in jdx's canonical form, so you can paste it into the next command.
The default surface is public (public and protected, which is what an addon compiles against). Add --visibility all if you mixin into private members too.
Step 2: which of my methods hit those changes?
A diff gives you a list of changes. What you need is the list of your own methods that touch them. Put your addon jar and the old library jar on the classpath. Old, because your bytecode still refers to the old members. Then ask about each breaking ref:
$ jdx callers 'com.example.relicapi.api.RelicRegistry#register(java.lang.String, com.example.relicapi.api.Relic)' --jars 'mods/*.jar' --jars relicapi-1.4.2.jar callers of 'com.example.relicapi.api.RelicRegistry#register(java.lang.String, com.example.relicapi.api.Relic)' call com.example.relicbags.RelicBags#onInitialize() relicbags-1.1.0.jar $ jdx callers 'com.example.relicapi.api.Relic#getCooldownTicks()' --jars 'mods/*.jar' --jars relicapi-1.4.2.jar callers of 'com.example.relicapi.api.Relic#getCooldownTicks()' call com.example.relicbags.RelicBags#onInitialize() relicbags-1.1.0.jar A field is not a method, so for the index field that became private you use usages (here --in limits the output to the addon jar):
$ jdx usages 'com.example.relicapi.api.RelicSlot#index' --in 'relicbags*' --jars 'mods/*.jar' --jars relicapi-1.4.2.jar usages of 'com.example.relicapi.api.RelicSlot#index' relicbags-1.1.0.jar (1) read com.example.relicbags.BagScreen#firstSlotIndex(com.example.relicapi.api.RelicSlot) BagScreen.java:4 That is a file and a line number, read from the LineNumberTable in the addon's bytecode.
For ABSTRACT_ADDED, the question is "who implements this interface?":
$ jdx implementors com.example.relicapi.api.Relic --jars 'mods/*.jar' --jars relicapi-1.4.2.jar hierarchy of 'com.example.relicapi.api.Relic' subtypes in workspace (1) class com.example.relicbags.SatchelRelic relicbags-1.1.0.jar SatchelRelic must now implement isCursed(). Its int getCooldownTicks() also no longer overrides anything, because 2.0.0 declares long getCooldownTicks().
Last, check the replacement API in the new jar before you rewrite the call:
$ jdx signature 'com.example.relicapi.api.RelicRegistry#register' --jars relicapi-2.0.0.jar signatures of com.example.relicapi.api.RelicRegistry#register public static void register(java.lang.String namespace, java.lang.String path, com.example.relicapi.api.Relic relic) source: relicapi-2.0.0.jar (bytecode) next: jdx show com.example.relicapi.api.RelicRegistry This took four lookups and no launcher run. Each of the three source files that need edits is named: RelicBags, BagScreen and SatchelRelic.
Step 3: loop over every breaking ref
--json gives you the same report as data, so you can feed the breaking refs into the lookups above:
$ jdx diff relicapi-1.4.2.jar relicapi-2.0.0.jar --json | jq -r '.result.findings[] | select(.severity=="breaking") | .ref' com.example.relicapi.api.RelicSlot com.example.relicapi.api.RelicRegistry#register(java.lang.String, com.example.relicapi.api.Relic) com.example.relicapi.api.RelicSlot#index com.example.relicapi.api.Relic#isCursed() com.example.relicapi.api.Relic#getCooldownTicks() com.example.relicapi.api.RelicRegistry#get(java.lang.String) Each finding also has severity, rule, type and detail (for example "int -> long").
Step 4: gate your own library's releases
If you are the one publishing the library mod, run the check the other way: compare your last release against the new build in CI. diff exits 0 whenever the comparison ran. Add --fail-on breaking to turn breaking changes into exit 1:
$ jdx diff relicapi-1.4.2.jar relicapi-2.0.0.jar --severity breaking --fail-on breaking api diff relicapi-1.4.2.jar -> relicapi-2.0.0.jar (public surface) breaking TYPE_MADE_FINAL com.example.relicapi.api.RelicSlot breaking MEMBER_REMOVED com.example.relicapi.api.RelicRegistry#register(java.lang.String, com.example.relicapi.api.Relic) breaking MEMBER_REMOVED com.example.relicapi.api.RelicSlot#index breaking ABSTRACT_ADDED com.example.relicapi.api.Relic#isCursed() breaking RETURN_TYPE_CHANGED com.example.relicapi.api.Relic#getCooldownTicks(): int -> long breaking RETURN_TYPE_CHANGED com.example.relicapi.api.RelicRegistry#get(java.lang.String): com.example.relicapi.api.Relic -> java.util.Optional 4 findings below --severity breaking 6 breaking 路 0 suspicious 路 4 informational 路 0 types added 路 0 types removed fail-on breaking: 6 breaking changes (exit 1) source: relicapi-1.4.2.jar (bytecode) source: relicapi-2.0.0.jar (bytecode) next: jdx members com.example.relicapi.api.RelicSlot The tally always covers the whole comparison, even when --severity hides some lines. A build with no API change prints no differences (3 types compared) and exits 0. If you meant to break things (it is 2.0.0, after all), the report is a ready-made "Breaking changes" section for your changelog.
Honest caveats
- jdx does not remap. It reads names exactly as they are stored in the jar. A mod jar from Modrinth or CurseForge built for Fabric or Quilt uses intermediary names for game classes, while your dev build uses Yarn or Mojang names. If your question involves Minecraft classes, pass the Loom-mapped jar that Fabric Loom or NeoForge ModDevGradle already wrote, with
--jars(forcallers/usages/signature) or as adiffargument. - diff only works within one mapping namespace. Yarn vs Mojmap, or intermediary vs named, share almost no names, so the report looks like everything was removed and re-added. That comparison is meaningless. Compare two jars that use the same names: two builds of a library compiled in one namespace (as here, where the library's own package names are not remapped), or two Loom-mapped Minecraft jars with the same mappings. Remapping is tracked in #24.
- It compares bytecode, not behavior. If a method keeps its signature but its meaning changes, the diff cannot see it. Use
jdx bodyon both jars for that. - Reflection and string-based lookups are invisible to
callers/usages, and so are mixin targets that are written as strings. Check your mixin configs separately. -
callersandusageshere are a static index of your jars, not a running game.
Links
- Guide (canonical for this post): See what changed between two Minecraft or mod versions
- Rule list and CI recipe: API diff for upgrades 路 jdx diff reference
- Repo: MohammadMD1383/jdx. If you have two real versions of a library mod where the report looks wrong, please open an issue.

