DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Make a Minecraft Data Pack and Add It to Your Server (Java Edition)

Build a working Minecraft Java Edition data pack from scratch, install it in the correct multiplayer world folder, verify it with commands, and troubleshoot compatibility, zip, namespace, and reload problems.
Length10 min Posted Quest giverVGSources Team

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.

The reliable way to make a Minecraft data pack is to create a folder with pack.mcmeta and data at its top level, add your files under a namespace, then place that folder (or a correctly structured zip) in the world’s datapacks directory. This guide targets Minecraft Java Edition multiplayer servers. It starts with a tiny function you can verify immediately, then covers version compatibility, packaging, installation, reloading, and the errors that most often keep a pack from appearing.

What a data pack is—and what this guide covers

A data pack is a collection of files that changes data-driven parts of a Minecraft Java Edition world without installing a server-side mod. Depending on its files, a pack can add or change functions, recipes, loot tables, advancements, tags, structures, and world-generation settings. The pack is loaded by a specific world, so installing it beside server.jar is not enough.

As an Amazon Associate I earn from qualifying purchases.

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

The examples below deliberately begin with one function that sends a chat message. A small, visible test lets you prove that Minecraft recognizes the pack before you add more complicated recipes, loot, or generation files.

Check your edition, server release, and permissions first

  • Edition: This workflow is for Minecraft Java Edition. Bedrock add-ons use a different format and folder system.
  • Exact release: Data-pack compatibility is tied to the Java Edition release running your server. Pack-format numbers and directory names can change.
  • File access: You need access to the server files, including the folder for the world that is actually loaded.
  • Command access: To reload and test in-game, you must be an operator with sufficient permission. You can also run the reload command from the server console.
  • Backups: Make a world backup before installing a pack that changes world generation or other persistent data.

Do not copy a pack-format number from an unrelated tutorial. For example, Java Edition 1.21.5 documents data pack format 71. That number is an example for that release, not a universal value. Confirm the format required by your server’s exact version before you write 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 between manual creation and datapack create

Approach Availability Control Best use
Manual folder and files Works as the portable baseline across releases that support data packs You choose the namespace, directory layout, metadata, and every file Learning, source control, offline editing, and packs you will move between servers
datapack create <id> <name> Added in Java Edition 1.21.6, where that command exists Minecraft creates an empty data-pack directory for the current world; you still add the content Quick server-side setup and automated workflows on compatible releases

The command is a convenience, not a replacement for understanding the layout. If you are teaching the format, supporting older releases, or editing files on your computer, use the manual method.

Build a minimal data pack manually

1. Create the top-level directory

Make a directory with a simple, lowercase name such as my_pack. At its root, create exactly two items: pack.mcmeta and a directory named data.

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

“At its root” means that opening my_pack immediately shows pack.mcmeta and data. Do not put them inside another nested my_pack directory.

2. Write pack.mcmeta

Create a plain-text file named pack.mcmeta (not pack.mcmeta.txt) and enter valid JSON. The number below is illustrative for a release that uses format 71; replace it with the value required by your server.

{
  "pack": {
    "pack_format": 71,
    "description": "My first data pack"
  }
}
  • pack is the required top-level object.
  • pack_format tells Minecraft which data-pack schema the files target.
  • description is the text Minecraft can display for the pack.

Use straight quotation marks, keep the commas and braces balanced, and save the file as UTF-8 text. A JSON error can prevent recognition even when the folders look correct.

3. Create a namespace

Inside data, make a directory for your namespace, for example my_namespace. A namespace keeps your files separate from Minecraft’s files and from other packs. Use lowercase letters, numbers, underscores, hyphens, and periods only; avoid spaces and punctuation that resource locations do not allow.

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

4. Add a function file

For releases whose function directory is spelled function, create that directory under your namespace and add hello.mcfunction.

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).
my_pack/
├── pack.mcmeta
└── data/
    └── my_namespace/
        └── function/
            └── hello.mcfunction

Directory spelling is release-specific. Some releases and older tutorials use a different pluralization, so follow the layout required by the exact server version rather than assuming that every tutorial applies unchanged.

Put one command on each line of the function file:

say Hello from my data pack!

Do not put a leading slash in a function file. In chat, commands normally begin with /; inside .mcfunction files, write the command itself. The file above is called with the resource location my_namespace:hello.

5. Check the complete tree before packaging

Your first pack should now look like this (adjust the function-directory spelling if your release requires it):

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

Keep this first version intentionally small. If Minecraft can load it and the function runs, you have established that the metadata, namespace, path, and command syntax are working.

Use the 1.21.6 creation command when it is available

Java Edition 1.21.6 added a server-side command that creates an empty data-pack directory for the current world:

/datapack create <id> <name>

Run it with the permissions required for server commands. Replace <id> with the pack identifier and <name> with the displayed name. The command creates the directory; it does not design your functions, recipes, or other content for you. Add the required pack.mcmeta and data contents according to the release’s format. If your server predates 1.21.6 or does not provide the command, create the directory manually instead.

Package the pack without adding an extra folder

Minecraft accepts either the pack directory or a zip file. In both cases, the pack’s top level must contain pack.mcmeta and data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

For a zip, open the archive and verify that its first level looks like this:

pack.mcmeta
data/

This is wrong:

my_pack/
└── my_pack/
    ├── pack.mcmeta
    └── data/

The extra outer directory is the most common packaging mistake. Minecraft sees the archive root, fails to find pack.mcmeta there, and the pack does not appear in the enabled list. Select the contents of my_pack when creating the archive, or copy the uncompressed my_pack directory directly instead of zipping its parent.

Install the pack on a multiplayer server

1. Stop editing and back up the world

Stop the server before moving files if you can, and make a backup of the world. This avoids edits being overwritten and gives you a recovery point for packs that alter persistent data or generation.

2. Locate the world-specific directory

Open the server’s main folder, then open the directory for the world the server loads. The default world directory is commonly named world, but a server can use a different level name configured in its settings. The path you need is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<server folder>/<world folder>/datapacks/

If datapacks does not exist inside that world directory, create it. Do not place the pack merely beside server.jar; that location is not the world’s data-pack folder.

3. Copy the directory or zip

Copy my_pack or the correctly structured zip into the world’s datapacks directory. Do not extract a zip one level too deep. When finished, the server should be able to reach pack.mcmeta at either:

<world>/datapacks/my_pack/pack.mcmeta

or, for an archive:

<world>/datapacks/my_pack.zip

For the archive, pack.mcmeta must be at the zip root, not inside another directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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

4. Reload the running server

Start the server, or if it is already running, execute:

/reload

You can enter the command in the server console without the leading slash, or run it in-game as an operator with sufficient permission. Reloading makes many command and data changes available without restarting.

5. Confirm that Minecraft recognized the pack

Run:

/datapack list enabled

The response should include your pack. The name shown can differ from the folder name because Minecraft may use the metadata description or an archive identifier. If it is listed as enabled, the loader found the root metadata and accepted the pack format.

Run a smoke test before adding complex content

  1. Run /datapack list enabled and confirm the pack appears.
  2. Invoke the sample function with /function my_namespace:hello.
  3. Confirm that the chat displays Hello from my data pack!.
  4. Check the server console for JSON, resource-location, or command errors.

This test verifies loading and command execution; it is not evidence that every future recipe, loot table, or generation file is valid. Add new content in small batches and repeat the test after each batch so the first failing change is easy to identify.

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

Know when reload is not enough

/reload is appropriate for many functions and data changes. World-generation changes are different. Custom dimensions and related generation files require leaving and reopening the world; a reload alone does not apply them. For those changes, close and reopen the world or restart the server as appropriate, and use a backup because generation can create persistent changes that are difficult to undo.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a pack that does not appear or run

Symptom Likely cause Fix
The pack is absent from /datapack list enabled It is in the wrong world, the datapacks directory is misplaced, or the root files are nested Follow the path <world>/datapacks/ and make sure pack.mcmeta is immediately inside the directory or zip root
Minecraft reports a pack-format or compatibility problem pack_format was copied from another release Check the exact server release and replace the value with that release’s required format
The pack loads, but /function my_namespace:hello cannot find the function The namespace, filename, or function-directory spelling does not match the command and target release Check that the file is under the namespace’s required function directory, is named hello.mcfunction, and is invoked as my_namespace:hello
The function runs but a line errors A command is invalid for the server release or contains a typo Read the console error, test the command directly in chat, and correct one line at a time
The zip looks right in the file manager but still fails The archive has an invisible extra outer folder or malformed JSON Open the archive itself, verify its first level, and validate the braces, quotes, and commas in pack.mcmeta
Changes to a dimension do not appear after reload World-generation data is not applied by reload alone Leave and reopen the world or restart the server, then test in a backed-up copy

Expand the working pack safely

Keep your namespace consistent

Use one namespace for your own files and refer to it consistently in commands and references. A typo in the namespace creates a different resource location rather than a helpful alias, so copy the exact spelling from the directory name.

Add one feature at a time

Once the greeting function works, add a second function or one data-driven feature, reload, and test. This isolates mistakes in JSON, identifiers, tags, and command syntax. Keep a plain-text copy of each change so you can revert the last working version quickly.

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

Separate development from the live world

Develop in a test world or a copy of the server world. Keep the pack directory under version control or make dated backups before changes. Test ordinary functions with /reload; reserve generation experiments for disposable worlds because reopening a world does not undo terrain already generated.

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

Document the target release

Record the Java Edition version, the chosen pack_format, and any release-specific directory spelling in a small README beside the pack. When the server updates, check compatibility before changing the metadata or moving files. A pack that worked on one release is not automatically valid on the next.

Quick pre-launch checklist

  • Java Edition is running on the server.
  • The pack targets the server’s exact release and uses its required pack_format.
  • pack.mcmeta and data are at the pack root.
  • The namespace and function path use the spelling required by that release.
  • The pack is inside the loaded world’s datapacks directory.
  • A zip, if used, has no extra outer folder.
  • pack.mcmeta is valid JSON and is not saved with an extra .txt extension.
  • /reload has been run after installation or edits.
  • /datapack list enabled shows the pack.
  • /function my_namespace:hello produces the expected message.
  • World-generation changes have been tested after reopening the world, not only after reload.

Frequently asked questions

Can I install this on a Bedrock server?

No. The folder structure and commands described here are for Minecraft Java Edition. Bedrock content uses a different add-on format and deployment process.

Does the pack belong beside server.jar?

No. It belongs in the datapacks directory inside the specific world directory that the server loads.

Is data pack format 71 always correct?

No. Format 71 is documented for Java Edition 1.21.5. Use the value required by your exact server release.

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

Why does my function file not use a slash?

Function files contain one command per line without a leading slash. The slash is used when you invoke the function in chat, for example /function my_namespace:hello.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.