Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk12 min

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

Create a Java Edition data pack from scratch, install it in the correct world folder, verify it with server commands, and fix packaging, version, namespace, and reload problems.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Minecraft data pack is a set of files that changes a Java Edition world without a traditional mod. To make one, create a pack containing pack.mcmeta and a data directory, add a namespaced function or other content, then place the pack directory or a correctly structured ZIP in your server world’s datapacks folder. Reload the server and confirm it with /datapack list enabled. The exact pack_format and directory names depend on the server’s Minecraft release, so match those before you write any files.

What a Minecraft data pack does

Data packs are a Java Edition feature. They let you customize a world with files rather than installing a client-side mod. Depending on the release and the files you provide, a pack can add functions, loot tables, structures, advancements, recipes, and tags. On a multiplayer server, the pack is attached to a particular 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.

This guide starts with a deliberately small function. A one-line function is easier to recognize, reload, and troubleshoot than a pack that introduces recipes or world generation immediately. Once the smoke test works, you can add the other data types using the same namespace and version rules.

Check the server and release before creating files

  • Edition: This workflow is for Minecraft Java Edition. Bedrock Edition uses a different add-on system and file layout.
  • Exact release: Data-pack compatibility is release-specific. Identify the version shown by the server, not merely the launcher version on your computer.
  • File access: You need access to the server’s world directory and permission to copy files there. For a hosted server, this may be a file manager or SFTP rather than a local folder.
  • Text editing: Use a plain-text editor. Make sure it does not silently append .txt to pack.mcmeta or .mcfunction files.
  • Backup: Keep a current world backup before adding a pack, particularly if it contains structures or world-generation files.

Do not copy a pack-format number from an unrelated tutorial. Minecraft Java Edition 1.21.5 documents data pack format 71; that is a release example, not a universal value. Newer and older releases can require different values.

#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 initial pack

Approach Availability What it provides Best use
Manual folders and files Works as the portable baseline across releases Complete control over pack.mcmeta, namespaces, functions, and every other data type Learning, version-controlled projects, and packs that must support more than one release
datapack create <id> <name> Added in Java Edition 1.21.6, where that command exists Creates an empty data-pack directory for the current world on the server Quick server-side setup or automation on a compatible release

The command is a convenience, not a replacement for understanding the layout. It is unavailable on releases that do not implement it, and you still need to add the correct metadata and content afterward. Use the manual method below when you need the widest compatibility.

Build a minimal data pack manually

1. Create the required root layout

Make a directory for the pack. At its top level, place pack.mcmeta next to a directory named data. Inside data, create a namespace for your pack. The following example uses my_namespace and a function named hello:

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 directory spelling for content can change between releases. This illustration uses function; verify the spelling required by the server release you are targeting before adding more files. Keep the namespace consistent everywhere: the directory name, the function path, and the command that calls it must match.

2. Write pack.mcmeta

Create pack.mcmeta at the pack root, not inside data and not inside another copy of the pack directory. Its JSON must identify the pack format accepted by the server and provide a description. For a 1.21.5 server, format 71 is the documented example:

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

Replace 71 when your server runs another release. An incorrect number can cause the pack to be rejected or marked incompatible. Keep the JSON valid: use double quotes, commas only where required, and no comments.

3. Add a first function

Open data/my_namespace/function/hello.mcfunction as plain text and enter one command per line:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
say Hello from my data pack!

Commands in a function are written as ordinary command lines; do not prefix the line with the chat slash. After the pack loads, an operator can invoke this file with:

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).
/function my_namespace:hello

Starting with one harmless message confirms three separate things: Minecraft found the root metadata, it recognized the namespace path, and it can execute a function. Add recipes, loot tables, advancements, or structures only after this test succeeds.

Package the pack without hiding its root

Minecraft accepts either the pack directory itself or a ZIP archive. In both cases, the item placed in datapacks must expose pack.mcmeta and data immediately at its root.

For a ZIP named my_pack.zip, opening the archive should show:

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.
pack.mcmeta
data/

A common mistake is selecting the outer project folder when compressing, producing my_pack/my_pack/pack.mcmeta. That archive is one level too deep and will not be recognized. Reopen the ZIP before uploading it and correct the nesting if necessary. The same rule applies when a file manager creates an archive automatically.

Install the pack on a multiplayer server

  1. Finish and package the files. Stop editing the copy you intend to upload. Use the directory or ZIP layout described above.
  2. Open the server directory. Locate the folder containing the server files, then open the folder for the world that should use the pack. The default world folder is commonly named world, but a server can use a different world name.
  3. Open the world’s data-pack folder. Inside that world folder, open or create datapacks. This is world-specific; do not place the pack merely beside server.jar.
  4. Copy the pack into datapacks. Upload the pack directory or ZIP as a direct child of that folder. If the server host provides separate world folders, choose the one corresponding to the world players actually enter.
  5. Reload the server. If the server is running, issue /reload from the server console, or run it in game as an operator with sufficient permission.
  6. Confirm recognition. Run /datapack list enabled. The pack should appear in the enabled list. If it does, run /function my_namespace:hello and look for the message in chat.

For a new server, you can also stop the server before copying files and start it again afterward. A reload is usually enough for command and data changes, but a restart is a useful clean test when a host’s file manager or permission system behaves unexpectedly.

Use the 1.21.6 creation command when available

Java Edition 1.21.6 added the server-side command datapack create <id> <name>. Its documented behavior is to create a new empty data-pack directory for the current world. Run it in the world context where the pack should be created, then add your metadata and content to the generated directory.

This command does not make an existing pack compatible automatically. You still need to check the target release’s metadata requirements, choose a namespace, and add files under data. If the server reports that the command is unknown, use the manual method; the release does not provide that command.

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.

Reloading, testing, and changes that need a world reopen

Changes that usually reload

/reload is appropriate for many function and data changes. After editing, reload, run /datapack list enabled, invoke the test function, and inspect the server console for JSON or command errors. This sequence distinguishes a pack that is not recognized from one that loads but contains a bad file.

World-generation changes

Custom dimensions and related world-generation files are different. A reload alone does not apply those changes to an already open world. Leave and reopen the world, or restart the server as appropriate for the change, and test in a disposable or backed-up world first. Do not assume that seeing the pack in the enabled list means a newly edited dimension is already active.

A repeatable smoke test

  1. Run /datapack list enabled and confirm the pack name.
  2. Run the exact namespaced function command.
  3. Check that the expected chat output appears.
  4. Read the server console for JSON parsing, unknown-command, or missing-file errors.
  5. Only then add the next feature and repeat the cycle.

Troubleshoot a pack that does not appear

Symptom Likely cause Fix
The pack is absent from /datapack list enabled It is in the wrong world folder, outside datapacks, or the server has not reloaded Verify the world-specific path, place the pack directly in datapacks, then run /reload or restart.
The ZIP is present but ignored pack.mcmeta is nested under an extra outer directory Open the ZIP and move the metadata and data directory to its root.
The server reports an incompatible pack pack_format does not match the server release Check the exact release documentation and replace the illustrative value with the required one.
The pack loads but /function fails Namespace, directory spelling, or filename does not match the command Compare data/<namespace>/function/<name>.mcfunction with /function <namespace>:<name>, including spelling and capitalization.
The function is found but a command errors The command syntax is invalid for the target release or a required argument is missing Read the console error, test the command by itself, and keep one command per function line.
A dimension or other generation edit has no effect The world has not been reopened Leave and reopen the world or restart the server, and test from a backup.

When debugging, return to the smallest possible pack: valid metadata plus the one-line hello function. If that loads, add one file or feature at a time. This prevents a malformed recipe or generation file from obscuring a basic path or packaging error.

Extending the working pack

Functions

Put additional function files in the same namespace directory and call them with their namespaced paths. Keep related commands in separate files so an error identifies a small unit of work. A startup or tick system can be added later, but first verify each function directly.

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

Recipes, loot, advancements, structures, and tags

These resources also live below the namespace inside data, using the folder names and JSON formats required by the target release. Copying a path from an older tutorial can fail even when the idea is still supported, because directory names and data schemas change. Check the release-specific documentation for each resource before adding it.

Versioning and backups

Keep the original working pack as a backup and record the server release next to the project. When upgrading Minecraft, review pack.mcmeta, folder spelling, and every JSON resource before enabling the pack on the production world.

Keep local and hosted server paths straight

On a local server, the path is usually visible in the same directory that contains the server files: open the active world folder and then datapacks. Do not assume the active world is always called world; the server can be configured with another world name. If several world folders exist, identify the one players actually load before copying anything.

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

On a hosted server, the equivalent path may be hidden behind a control panel. Use the panel’s file manager or SFTP connection to open the world directory, then its datapacks folder. Upload the pack as one direct child. If the host separates multiple worlds, repeat the installation only in the worlds that should use the pack. A pack in one world’s folder does not automatically apply to every world on the server.

Make the upload while the server is stopped when you want the least ambiguous deployment. If you upload while it is running, finish by issuing /reload. Keep a copy of the exact uploaded ZIP or directory so you can restore the known-working version if a later edit fails.

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

Check names and paths before testing commands

A data pack has several names that must agree: the pack folder or archive name, the namespace below data, the function filename, and the namespaced command. The archive name can be descriptive, but the namespace and function path are what Minecraft uses for /function. For the example, the path data/my_namespace/function/hello.mcfunction maps to /function my_namespace:hello.

Compare the path character by character when a function is missing. Check capitalization, underscores, and the singular directory spelling required by the target release. A valid pack.mcmeta does not compensate for a namespace directory in the wrong place. Likewise, a recognized pack can still contain a function whose command syntax is invalid; the console error then points to the function’s command rather than the installation path.

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

Plan a safe iteration cycle

  1. Save a known-good copy containing only pack.mcmeta, data, and the one-line function.
  2. Add one new function or resource while recording the server release you are targeting.
  3. Upload the changed directory or rebuild the ZIP, checking its root before transfer.
  4. Run /reload when the change is a reloadable function or data resource.
  5. Use /datapack list enabled, invoke a namespaced test function, and read the console.
  6. For dimensions or other world-generation files, reopen the world or restart the server before deciding whether the change worked.

This sequence gives each failure a narrow cause. If the pack disappears from the enabled list, investigate placement, ZIP nesting, metadata, and release compatibility. If it remains enabled but a function fails, inspect the namespace, filename, directory spelling, and command syntax separately.

Final deployment checklist

  • Java Edition server release identified.
  • pack.mcmeta is at the pack root and contains the format required by that release.
  • data is beside pack.mcmeta, with a consistent namespace below it.
  • The first .mcfunction file uses the directory spelling required by the release.
  • The ZIP, if used, does not contain an extra outer pack folder.
  • The pack is in the target world’s datapacks folder.
  • /reload has been run when appropriate.
  • /datapack list enabled shows the pack.
  • The namespaced test function runs successfully.
  • World-generation changes have been tested after reopening the world or restarting the server.

Frequently Asked Questions

How do I make a Minecraft data pack?

Create a root folder containing pack.mcmeta and data. Add a namespace below data, then place a function such as hello.mcfunction in the release-appropriate function directory. Set pack_format for the exact Java Edition release, and invoke the function with its namespaced /function command.

Where is the server world/datapacks folder?

Open the server directory, identify the active world folder (commonly world, but not always), and open or create datapacks inside it. On a hosted server, use the provider’s file manager or SFTP. The folder is world-specific and is not simply the directory beside server.jar.

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

Why does my data pack not show up in /datapack list?

Check that it is in the active world’s datapacks folder, reload the server, and inspect the ZIP root. pack.mcmeta and data must be immediately inside the directory or archive; an extra outer folder prevents recognition. Then check valid JSON, the namespace path, and the release’s required pack format.

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.

What pack_format does Minecraft 1.21.5 use?

Minecraft Java Edition 1.21.5 documents data pack format 71. Treat 71 as an example for that release, not a timeless value. Older and newer releases can require different numbers, so verify the exact server release before writing pack.mcmeta.

Can I install a data pack while the server is running?

Yes. Copy the directory or correctly rooted ZIP into the active world’s datapacks folder and run /reload from the console or as an operator with sufficient permission. Stopping the server first is also a useful clean deployment option, especially when a host’s file manager or permissions are uncertain.

Does /reload apply custom dimensions immediately?

No. Reload handles many function and data changes, but custom dimensions and related world-generation edits require leaving and reopening the world or restarting the server as appropriate. Test those changes in a disposable or backed-up world.

What is the 1.21.6 datapack create command?

Java Edition 1.21.6 added datapack create <id> <name>, which creates an empty data-pack directory for the current world. It is a convenience available only on releases that implement the command; you still need to add compatible metadata, a namespace, and your data files.

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

Should I use a folder or a ZIP?

Either is accepted. A folder is convenient while editing, while a ZIP is convenient for transfer. Whichever you use, pack.mcmeta and data must be at the item’s root, not under a second copy of the pack folder.

The Bottom Line

Build the smallest valid Java Edition pack first: put a release-appropriate pack.mcmeta beside data, add one namespaced function, and verify it locally. Upload that directory or a ZIP with no extra outer folder into the active world’s datapacks directory, run /reload, and confirm it with /datapack list enabled. Match every format and directory name to the server’s exact release, and reopen the world or restart the server for world-generation changes.

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 *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

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.