Skip to content

Commands

EnderTurret edited this page Mar 5, 2026 · 3 revisions

Patched adds a few commands that can be used to inspect the state of resources. They are useful when trying to figure out why your patches aren't working, or in creating patches in the first place. They can also be used if you're curious what patches are doing.

Patched adds two commands for these purposes: /patched and /patchedc. The difference is that /patched examines server-side resources -- that is, resources from data packs -- whereas /patchedc examines client-side resources (from resource packs).

The list subcommand

The list subcommand allows listing the packs with patching enabled, as well as the patches contained within these packs.

For the first one, /patched list packs will list all the packs with patching enabled.

For the second, /patched list patches <pack> will list all the patches belonging to a specified pack. You can use the first command to find the pack you're looking for.

The dump subcommand

This is the more useful subcommand -- it allows dumping the contents of patches and patched files, and are what separates this mod from being "just another patching mod" (not that there are many of those).

/patched dump patch <pack> <location> allows you to dump the contents of a patch, which can be used to figure out what a pack is doing (and possibly why.)

/patched dump file <location> allows you to dump the contents of a patched file. The output of the command will also include comments indicating what elements were changed/added/removed and by who. For example:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    { // replaced by Better Steel
      "item": "minecraft:netherite_ingot"
    },
    {
      "item": "minecraft:flint"
    }
  ],
  "result": {
    "item": "minecraft:flint_and_steel"
  }
}

In this example, it is very clear what was changed, and we even know who changed it. Specifically, we can gather that the "Better Steel" data pack replaced the ingredient with a different one.

There are also a few variations of this command. Using the previous example, here's what it looks like using /patched dump file <location> raw:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "item": "minecraft:netherite_ingot"
    },
    {
      "item": "minecraft:flint"
    }
  ],
  "result": {
    "item": "minecraft:flint_and_steel"
  }
}

Looks pretty plain, right? This is the patched file without comments (which is what the code reading the file actually sees).

Finally, the command /patched dump file <location> unpatched can be used to dump the original file:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "item": "minecraft:iron_ingot"
    },
    {
      "item": "minecraft:flint"
    }
  ],
  "result": {
    "item": "minecraft:flint_and_steel"
  }
}

The trace subcommand

The trace subcommand allows tracing the resolution of a given file — what packs are providing the file, what packs are patching the file, and which packs' modifications are being overriden. It is available in versions 9.0.0 onwards.

For example, /patched trace minecraft:recipe/bucket.json on NeoForge may produce the following output:

minecraft:recipe/bucket.json
└ file from mod/NeoForge applies
# file from vanilla is overriden

Alternatively, /patchedc trace minecraft:models/block/amethyst_block.json could produce the following output (with some various resource packs installed):

minecraft:models/block/amethyst_block.json
├ patch from file/MultiPatch Test applies
└ file from file/Tests 3 applies
# patch from file/Tests 1 is overriden
# patch from file/Tests 2.zip is overriden
# file from vanilla is overriden

The order that packs are listed in matches the order they'd be listed in the resource pack screen, with the least prioritized packs towards the bottom and most prioritized packs towards the top. This order is reversed compared to the /datapack list output, which lists least prioritized packs towards the beginning and most prioritized packs towards the end.

Clone this wiki locally