{
  "id": 22401930,
  "title": "Who calls this Minecraft method? Find callers and usages across your mod, Fabric API and the game jar",
  "url": "https://urgent.news/2026/11/28/who-calls-this-minecraft-method-find-callers-and-usages-across-your",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-28T16:25:07.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mohammadmd1383/who-calls-this-minecraft-method-find-callers-and-usages-across-your-mod-fabric-api-and-the-game-5f5j"
  },
  "original_language": null,
  "account": "When modifying or wrapping vanilla methods in Minecraft, it's essential to know who else calls these methods. This includes vanilla code, Fabric API, your own sources, and potentially other mods that your mod depends on. In an IDE, this is achieved through the \"Find Usages\" feature, while from a terminal or with AI coding agents, it often involves using unzip, javap, and grep.\n\nJdx offers a command-line tool that provides an answer to this question. To use it, you first need to build a workspace over the jars you care about. Jdx reads Maven/Gradle dependency caches on its own, but it doesn't automatically discover the Loom-remapped Minecraft jar, so you must pass it explicitly. You can find the remapped jar in the folder containing the Minecraft common jar.\n\nTo explore callers, you can use the command \"jdx -w mc callers 'net.minecraft.world.item.ItemStack#getMaxStackSize()'\". This command is override-aware by default, meaning it will consider calls through supertypes or overrides. If you only want to see calls that bind to exactly that declaration, you can add the \"--exact\" flag. Bytecode edges carry file and line information from the class's LineNumberTable, allowing you to jump directly to the relevant spot.\n\nThe \"calls\" command in jdx helps you understand what methods a specific method calls. The \"usages\" command reveals every reference to a type, complete with context. For example, \"jdx -w mc usages net.minecraft.world.item.ItemStack --context\" will output a short inline snippet for each hit, rather than just a bare list. Commands like these can also be scripted using \"--json\". If there's any ambiguity in the name, jdx will exit with a 2 status code and list each candidate as a paste-ready reference instead of making an assumption.\n\nJdx's functionality is exposed through an MCP server (jdx_callers, jdx_usages, jdx_calls) and can be integrated with the jdx setup command, which allows you to wire it up with various agents like \"claude-code\". When using jdx, keep in mind that it doesn't remap names; they are presented in the namespace used by the individual jar. Names are queried using the exact names of the jar. Also, the Loom-remapped jar must be passed through the \"--jars\" flag, as Maven-style dependencies are not discovered automatically. The \"callers\" and \"usages\" commands only perform bytecode navigation based on the classpath provided and do not understand mixin injection targets. When comparing different game versions, jdx diff only makes sense within the same mapping namespace. Jdx parses bytecode using ASM and never loads or runs the classes, ensuring that inspecting a random mod jar doesn't execute any potentially malicious code. To install jdx, run \"curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh | bash\", which requires Java 21 or higher and works on Linux, macOS, and Windows. The tool is licensed under the Apache-2.0 license. For more information, visit the official documentation at https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/.",
  "summary": "When I change a mixin or wrap a vanilla method, the first thing I want to know is: who else calls this? Vanilla code, Fabric API, my own sources, maybe another mod I depend on. In an IDE that's \"Find Usages\". From a terminal, or from an AI coding agent, it usually turns into unzip + javap + grep. jdx answers that question as a command. Here is the workflow I use, with the limits up front. Build a…",
  "summary_source": "publisher",
  "key_points": [
    "Jdx tool finds callers and usages of Minecraft methods",
    "Use \"jdx -w mc callers\" to explore method callers",
    "\"jdx -w mc usages\" reveals every reference to a type"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}