Run these from an operator’s chat, a command block, or a function file. Stopwatch and Fetchprofile are newer commands — check availability on your Minecraft version.

How to Use the Datapack Command Generator

  1. Pick a mode: Enable, Disable, List, or Create.
  2. For Enable/Disable, type the pack’s identifier exactly as the game reports it – usually file/my_pack for a folder or zip dropped in the world’s datapacks folder.
  3. For Enable, optionally set a load order: first, last, or relative to another already-enabled pack (before/after).
  4. For List, optionally filter to just available or just enabled packs.
  5. For Create, type a new pack ID and description to scaffold a fresh pack directly from the running world.
  6. Copy the generated /datapack command into the console or an operator’s chat.

Command Syntax Reference

/datapack enable <name> [first|last|before <pack>|after <pack>]
/datapack disable <name>
/datapack list [available|enabled]
/datapack create <id> <description>

/datapack enable "file/my_pack" turns on a pack that’s currently only available (installed but inactive). By default it’s inserted just above the built-in vanilla pack, but you can force it to load first, last, or explicitly before/after another named pack – load order matters because later-loaded packs override earlier ones for the same resource ID. /datapack disable "file/my_pack" turns it off without uninstalling it. /datapack list prints every pack Minecraft knows about; add available or enabled to filter. /datapack create my_new_pack "My new datapack" generates a ready-to-edit pack folder (with a valid pack.mcmeta) directly inside the world’s datapacks directory – a fast way to start a new pack without hand-writing the metadata file.

Frequently Asked Questions

Why do I need quotes around the pack name?

Pack identifiers as Minecraft reports them include a slash, like file/my_pack or file/my_pack.zip, so they need to be quoted as a single string argument rather than being read as two separate words.

Does enabling a pack apply immediately, or do I need to reload?

Enabling and disabling packs via /datapack takes effect immediately – it triggers the same kind of function/tag/loot-table reload as /reload, just scoped to the pack you toggled, without needing to restart the world.

What’s the actual effect of load order (before/after/first/last)?

When two enabled packs define the same resource (the same function, recipe, or loot table path), whichever pack loads later in the order wins and overrides the earlier one. Explicit before/after ordering lets you guarantee your pack’s overrides always take priority over – or always yield to – a specific other pack, regardless of installation order.

Can /datapack create replace hand-authoring a datapack from scratch?

It gets you a valid starting skeleton – a correctly formatted pack.mcmeta and folder – instantly from inside the running game, which is genuinely useful for prototyping, but you’ll still need to add your own functions, loot tables, or other data files afterward.

Related Tools