Command Extractor

Command Extractor

Extract available in-game commands to a JSON file

4 107 downloads 15 followers

command_extractor

Command Extractor is a Minecraft mod that extracts available in-game commands to a JSON file, using the same mechanism as the Minecraft built-in data generator.

This mod is useful if you are a Minecraft datapack developer/programmer working in an environment with modded or user-defined commands. Several Minecraft datapack and command-related tools, such as MCDatapacker (I made it), Spyglass and Beet's mecha, accept a user-defined commands.json file. That JSON file defines structures and arguments of various Minecraft commands. You can utilize the file exported by Command Extractor to make these tools aware of these custom commands.

This mod requires Architectury API mod to be installed.

Command Extractor currently supports Minecraft 1.20.1, 1.20.4 and 1.21.1, tested on Forge, NeoForge*, Quilt*, and Fabric. Use older versions of the mod for Minecraft 1.19.2 and 1.19.4. Starting from Minecraft 1.21.1, the mod is only available on Fabric and NeoForge. Note that sometimes a version of the mod may work on other patch versions of Minecraft, but I don't test all combinations. For example, the mod version for Fabric 1.21.1 also runs on Fabric 1.21.5.

Usage

Run /cmdextr command inside the game to extract commands.

The extracted JSON command tree file will be saved into extracted/commands.json in the game folder.

By default, the cmdextr command itself is not included in the output file unless /cmdextr all is used. Nevertheless, the output file contains both vanilla and non-vanilla commands.

Mods incompatibilities

Since the mod uses the built-in logic to export data, it can't gracefully ignore problematic commands. Therefore, this mod may not play well with some other mods.

In my tests, the following mods don't work with Command Extractor:

  • Spartan Weaponry (SpartanWeaponry-1.20.1-forge-3.1.3-all.jar)

No gallery available for this project.

Version Minecraft Loader Download

v1.1.1 for NeoForge 1.21.1

1.1.1

1.21.1
neoforge
Download

v1.1.1 for Fabric 1.21.1+

1.1.1

1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9
fabric
Download

v1.1.0 for Forge 1.19.2

1.1.0

1.19.2
forge
Download

v1.1.1 for Fabric 1.20.4

1.1.1

1.20.4
fabric
Download

v1.1.1 for Quilt 1.20.4

1.1.1

1.20.4
quilt
Download

v1.1.1 for Forge 1.20.4

1.1.1

1.20.4
forge
Download

v1.1.1 for Forge 1.20.1

1.1.1

1.20.1
forge
Download

v1.1.1 for Quilt 1.20.1

1.1.1

1.20.1
quilt
Download

v1.1.1 for Fabric 1.20.1

1.1.1

1.20.1
fabric
Download

v1.1.0 for Fabric 1.19.2

1.1.0

1.19.2
fabric, quilt
Download

v1.1.0 for Quilt 1.19.4

1.1.0

1.19.4
quilt
Download

v1.1.0 for Forge 1.19.4

1.1.0

1.19.4
forge
Download

v1.1.0 for Fabric 1.19.4

1.1.0

1.19.4
fabric, quilt
Download

v1.0.0 for Quilt 1.19.4

1.0.0

1.19.4
quilt
Download

v1.0.0 for Forge 1.19.4

1.0.0

1.19.4
forge
Download

v1.0.0 for Fabric 1.19.4

1.0.0

1.19.4
fabric
Download