View on GitHub

moddertools

Datapacks

Datapack File Structure

  1. Create a new folder and give it any name you want. It’s a good idea to give it a unique name so you can easily locate it and identify
  2. Inside that folder you will need an pack.mcmeta file and a folder named data. This step is where you will have to make a change based on what version of Minecraft you are using. For certain versions, the mcmeta file requires a pack_format entry. That list is as follows:

For example, if you are making a datapack for Minecraft 1.18.2 your entire mcmeta file should look like this:

{
  "pack": {
    "pack_format": 9,
    "description": "You can add any description you like here. It will appear in the Datapack information"
    }
}

That’s it, that’s the entire mcmeta file!

  1. Inside the data folder is where you can now create or drag-and-drop a mod datapack to begin customizing. Easiest way to do this and understand how to edit a mod is to locate the mod jar file you want to edit. In your mods folder, find a mod you’d like to edit and open it as if it was a zip file. Windows can do this with file explorer or you can use a tool like 7Zip. Since jar files can be treated like a Zip or Compressed Folder, you can access the files inside very easily. If you see a data folder inside the jar file then you have some access to editing the mod. Inside the data folder you will see a “namespace”, which basically means the name of the mod or datapack you’re working with. The easiest way to work with the mod’s datapack is to copy the namespace folder into your own datapack data folder

** Loading a Datapack

Main Page