Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The reliable method is simple: create a folder with pack.mcmeta and data at its root, add your namespace and function files, place the folder or a correctly structured ZIP in the active world’s datapacks directory, run /reload, and confirm it with /datapack list enabled. This guide covers Minecraft Java Edition, including the release-specific pack format and the optional datapack create command introduced in Java Edition 1.21.6.

What a Minecraft data pack does

A data pack is a collection of files that changes a Minecraft Java Edition world without installing a traditional mod. Depending on its files, it can add functions, recipes, loot tables, advancements, tags, structures and world-generation data. A multiplayer server loads the pack for a particular world, so installing it beside server.jar is not enough.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Data packs are version-sensitive. File names, directory names and the value in pack.mcmeta can change between releases. Choose the exact Minecraft version running on the server before writing the pack, and treat examples for one release as examples rather than universal settings.

Before you start: confirm the edition and server release

  • Edition: this workflow is for Minecraft Java Edition. Bedrock Edition uses a different add-on system and will not recognize a Java data pack.
  • Server release: record the exact version shown by the server, such as 1.21.5 or 1.21.6. Do not copy a pack-format number from an unrelated release.
  • Access: you need access to the server files and permission to run commands as an operator or through the server console.
  • A backup: back up the world before installing a pack that changes loot, structures or world generation.

Java Edition 1.21.5 documents data pack format 71. That number applies to that release example; it is not a permanent value. Check the documentation for the exact server release before filling in pack.mcmeta.

#1 Best Overall
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code
  • DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

Choose how to create the pack

Approach Availability What it creates Best use Limitation
Manual folder method Works across releases that support data packs You create pack.mcmeta, data, the namespace and every content file Learning the file layout, version control and automated deployment More setup and more opportunities for a path or packaging mistake
datapack create Available in Java Edition 1.21.6 and releases that provide this command An empty data-pack directory for the current world Quick server-side creation when working directly in a world It does not write your functions, recipes or other content, and it is unavailable on older releases

The manual method is the portable baseline. In Java Edition 1.21.6, the command syntax is datapack create <id> <name>; Mojang describes it as creating a new empty directory data pack for the current world. Run it only on a server release that includes that command.

Build a minimal data pack manually

1. Create the directory tree

Make a new folder anywhere convenient while you edit it. The example below calls it my_pack and uses my_namespace as its namespace:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
my_pack/
├── pack.mcmeta
└── data/
    └── my_namespace/
        └── function/
            └── hello.mcfunction

The two items at the top level are essential: pack.mcmeta and data. They must be directly inside the pack folder, not inside another copy of that folder. The namespace directory holds your content. The illustrative release layout uses the singular function directory; directory spelling is release-specific, so verify the required spelling for the server version you selected.

Use a namespace that identifies your pack and keep the same spelling everywhere. The namespace is part of the resource location used when you invoke a function or refer to another data file.

2. Write pack.mcmeta

Create a plain-text file named exactly pack.mcmeta at the pack root. It must contain valid JSON. For a Java Edition 1.21.5 example, whose documented format is 71, the file can look like this:

{
  "pack": {
    "pack_format": 71,
    "description": "My first data pack"
  }
}

Replace 71 with the value required by the server’s actual release. Do not add a second extension such as .txt; enable file-name extensions in your operating system if necessary. Keep the description short and use standard JSON quotation marks. A missing comma, extra comma or mismatched brace can prevent the pack from loading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Add a first function

Inside the namespace’s function directory, create hello.mcfunction with one command per line:

say Hello from my data pack!

Function files are plain text. Write commands without a leading slash, one command on each line. The leading slash is used when you type a command in chat or the console; the function file contains the command itself.

Rank #2
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

Start with this one-line function so you can prove that the pack is recognized before adding recipes, loot tables or generation files. Once it loads, the matching resource location is my_namespace:hello.

Optional: create the empty pack with datapack create

If the server is running Java Edition 1.21.6 or another release that supplies the command, an operator can run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
/datapack create my_pack "My first data pack"

The command creates an empty data-pack directory for the current world. The identifier and display name are supplied in the command; the command does not generate your function file or other custom content. After creation, inspect the resulting directory and add the namespace and files described above. If the command is unknown, use the manual method instead of trying to force it on an older server.

Package the pack correctly

Minecraft accepts either the pack directory or a ZIP archive. Whichever form you use, the pack’s root must directly contain pack.mcmeta and data.

Using the directory form

Copy the entire my_pack directory into the world’s datapacks folder. Do not copy only the inner data directory or only the namespace.

Using a ZIP file

When creating the archive, select the contents of my_pack so that the ZIP opens to:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
pack.mcmeta
data/

A frequent error is an extra outer directory. If the ZIP opens to my_pack/my_pack/pack.mcmeta, Minecraft sees the wrong root and will not recognize it. Rename or rebuild the archive so pack.mcmeta is at the first level.

Inspect the finished archive before uploading it. The first view should show the metadata file and the data directory, not another archive, a second copy of the project folder or loose files scattered at different levels. Keep the original editable directory separately so a correction does not require unpacking the only deployed copy.

Rank #3
Minecraft | Standard Edition | XBOX Digital Code
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
  • SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
  • COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.

Install the pack on a multiplayer server

  1. Finish and package the files. Stop editing the copy you intend to deploy, then use either the directory or ZIP form with the correct root.
  2. Open the server folder. This is the directory containing the server installation and its world folders.
  3. Open the active world folder. The default world folder is commonly named world, but use the folder for the world the server actually loads.
  4. Open or create datapacks. The path normally looks like server-folder/world/datapacks.
  5. Copy the pack into that folder. Copy the whole pack directory or the ZIP, not a loose pack.mcmeta file by itself.
  6. Reload the server. If the server is running, execute /reload from the console, or run it in game as an operator with sufficient permission.
  7. Confirm recognition. Run /datapack list enabled. Your pack should appear in the enabled list.
  8. Run the smoke test. Invoke the sample function with /function my_namespace:hello. The server should display the greeting.

The world-specific location matters: putting a pack next to server.jar, in the server root, or in a different world’s datapacks folder does not install it for the active world.

For a live server, perform the file copy during a controlled maintenance window when possible. Keep a backup of the world and note which pack version you installed. If you operate several worlds, repeat the installation in each world’s own datapacks directory; a pack copied to one world is not automatically available in another.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the installation in a controlled order

Use these checks in order rather than adding complex content immediately:

  • /datapack list enabled confirms whether Minecraft recognized and enabled the pack.
  • /function my_namespace:hello confirms that the namespace, directory spelling and function file path agree.
  • The server console reveals JSON parsing errors, invalid commands and other load messages.
  • If the function runs, add one feature at a time and reload between changes so the first failing file is easy to identify.

Do not treat a successful reload as proof that every feature works. A pack can be recognized while a particular command, recipe or data file is invalid. The small function test isolates the basic installation first.

When a test fails, change one variable at a time: confirm the folder location, then the root layout, then the metadata JSON, then the namespace path. This order prevents a working function from being hidden by several simultaneous edits. Save the console message with the pack version in your notes so the same failure can be reproduced after an update.

Why the pack does not appear in /datapack list

Symptom Likely cause Fix
The pack is absent from the enabled list It was placed beside the server installation instead of in the active world’s datapacks folder Move the directory or ZIP to the active world path, commonly world/datapacks, then run /reload
The ZIP is present but ignored pack.mcmeta is buried under an extra outer folder Open the ZIP and rebuild it so pack.mcmeta and data are at the root
Loading reports a JSON error Malformed pack.mcmeta, such as a missing quote, brace or comma Validate the JSON, keep the example structure, and inspect the console’s error location
The pack is detected but the function cannot be found The namespace, directory name, file name or release-specific path is wrong Check that the file is at the expected namespace function path and invoke the exact resource location
The server warns about compatibility The pack_format value does not match the target release Look up the format for the exact server version and update pack.mcmeta
Changes do not appear after editing The server has not reloaded the changed files, or the change is world-generation data Run /reload for ordinary data changes; use the world-reopen procedure described below for generation changes

Also check capitalization and spelling. The namespace in the directory, the namespace in the command and the file name must match exactly. A function named hello.mcfunction is called with my_namespace:hello, not with the pack’s display name. If the pack is recognized but that command fails, concentrate on the path rather than rebuilding the entire archive.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reload behavior and world-generation limits

/reload is appropriate for many command and data changes, including the simple function in this tutorial. It reloads the server’s data packs without requiring a full process restart.

World-generation changes are different. Custom dimensions and related generation files require leaving and reopening the world; a reload alone does not apply those changes. Plan generation work before players explore the affected areas, keep a backup, and reopen the world or restart the server as appropriate for the change.

Rank #4
Minecraft
  • Skins! We have biome settlers, city folk, town folk, and more!
  • The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
  • Cross platform play for up to five players between Pocket Edition and Windows 10
  • Revamped touch controls, controller support, and a controller mapping screen
  • Enhanced Weather effects! Accumulating snow and more

Do not use a reload as a substitute for changing the target world. A pack may be enabled while an already-open world continues using its existing generation state. Test dimension and generation files on a copy first, then reopen that world and verify the result before deploying it to players.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Expand the working pack safely

Functions

Add additional .mcfunction files under the namespace’s function directory. Keep each command on its own line and invoke a function with its namespace-qualified name. Small, single-purpose functions are easier to diagnose than one very large file.

Recipes, loot and advancements

These features live under other resource directories beneath the namespace. Preserve the same root layout: pack.mcmeta and data at the top, then the namespace and the release-required subdirectory. Add one feature, reload, and check the console before moving to the next.

Tags and structures

Tags and structures also belong below data in the namespace-specific locations required by the target release. Their exact file schemas are separate from the minimal function example, so do not assume that a valid function file proves a recipe, loot table or structure file is valid.

World-generation files

Dimensions and other generation resources need extra care because reload does not apply them. Test them on a copy of the world, reopen the world after changes, and avoid experimenting on the only production copy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep content grouped by purpose and record the release for which each file was written. When a release changes a directory name or schema, update the affected files together instead of mixing paths from different versions. A minimal working function is a useful baseline for separating a version problem from a content-specific problem.

Directory versus ZIP: which should you use?

  • Use a directory while developing: it is easy to open a file, correct it and reload.
  • Use a ZIP for distribution: it is a single file to upload or archive, provided its root is correct.
  • Keep an editable source copy: never rely on the only copy inside an uploaded ZIP.
  • Record the target release: include the intended Minecraft version in your project notes because the pack format and directory spelling can change.

Minecraft does not care whether the valid pack is a directory or ZIP; it cares that the root and files are in the expected locations and compatible with the server release.

A repeatable server deployment checklist

  1. Confirm the server is Java Edition and write down its exact release.
  2. Check the release’s required pack_format and directory names.
  3. Build a pack whose root contains pack.mcmeta and data.
  4. Use a namespace and place a one-line test function in the release-correct function directory.
  5. Open the finished directory or ZIP and verify there is no extra outer folder.
  6. Copy it to the active world’s datapacks directory.
  7. Run /reload with console or operator permission.
  8. Run /datapack list enabled and confirm the pack appears.
  9. Run the namespace-qualified test function.
  10. Read the server console before adding more files.
  11. For generation changes, reopen the world instead of relying on reload.

Key points to remember

  • Data packs in this workflow are a Java Edition feature.
  • pack.mcmeta must sit at the pack root alongside data.
  • The installation target is the active world’s datapacks folder, not merely the directory containing server.jar.
  • /reload handles many ordinary data changes, while /datapack list enabled verifies recognition.
  • Pack-format numbers and folder names are release-specific. The documented format 71 example is for Java Edition 1.21.5, not every version.
  • World-generation changes require leaving and reopening the world; a reload alone is insufficient.

Frequently Asked Questions

Can I use this method on Minecraft Bedrock Edition?

No. This workflow is for Minecraft Java Edition. Bedrock uses a different add-on system and will not recognize a Java data pack.

Best Value
Minecraft - Bedrock Edition PS4
  • Play and share with friends on console, mobile and Windows 10
  • discover community creations in the new in-game store
  • access new mini games and game modes through servers

Where does a data pack go on a server?

Put the complete pack directory or ZIP in the active world’s datapacks folder, commonly server-folder/world/datapacks. The folder beside server.jar is not the installation target.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What pack format should I use for Minecraft 1.21.5?

Java Edition 1.21.5 documents data pack format 71. Check the exact server release before using that value, because pack-format numbers are not universal.

Why is my pack missing from /datapack list enabled?

Check that it is in the active world’s datapacks folder, that pack.mcmeta is at the pack root, that the JSON is valid, and that you ran /reload.

Do function files include a slash before commands?

No. Put one command per line without a leading slash inside the .mcfunction file. Use the slash when invoking a command in chat or the console.

Does /reload apply custom dimensions?

No. World-generation changes, including custom dimensions and related files, require leaving and reopening the world; reload alone is insufficient.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does datapack create do?

On Java Edition 1.21.6 and releases that provide it, datapack create <id> <name> creates an empty data-pack directory for the current world. You still add the namespace and content files yourself.

The Bottom Line

For a dependable Java server deployment, target the server’s exact release, keep pack.mcmeta and data at the pack root, install the pack in the active world’s datapacks directory, reload, and verify both recognition and the test function. Treat generation changes separately: reopen the world after changing them.

Quick Recap

Bestseller No. 4
Minecraft
Minecraft
Skins! We have biome settlers, city folk, town folk, and more!; The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
$6.99
Bestseller No. 5
Minecraft - Bedrock Edition PS4
Minecraft - Bedrock Edition PS4
Play and share with friends on console, mobile and Windows 10; discover community creations in the new in-game store
$42.98

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.