Datapacks for Dummies - AllenSeitz/DimDungeons GitHub Wiki

Datapacks for Dummies

One common request I get as a modpack developer is "Can you please make a config setting to change the loot?". Or to change the recipes or make some item unobtainable.

Surprisingly you can do all this and more with datapacks! And it is neither hard nor tedious. I'll show you how.

Sometimes players aren't trying to design modpacks; they just have their own handpicked mods for a server that only close friends will connect to. If this describes you then datapacks are still for you. This isn't advanced magic for modpack developers. Datapack overrides are actually a vanilla feature that are supposed to be commonly used.

Creating a Datapack Quickly

  1. Navigate to your world's save folder in your .minecraft directory. Datapacks exist separately for each world.

  1. Inside the /datapacks folder for your world create a new folder called "example".

  2. Open the .jar file of the mod that you want to "mod" in a program that handles .zip files such as winzip or 7zip.

  1. Copy the pack.mcmeta file and the 'data' folder into your "example" folder.

That's all! You just made a datapack. It is strongly encouraged to now delete every file which you do not modify. But for now you can browse your new datapack in Notepad (or any text editor) and see what types of things you might want to change.

Doing Things With a Datapack

Enter the data folder and you'll see (probably) two folders named 'minecraft' and 'dimdungeons'. Inside the minecraft folder you can override vanilla minecraft things. For now I'll assume that you're using Dimensional Dungeons as your example. So look inside the dimdungeons folder.

Okay, I'm setting you free. Go nuts with a text editor. Want to change my advancements or add new ones? The json format is described on the official-unofficial Minecraft Wiki. Would you like the building dimension to use the sky of the overworld, but have the time locked to night time? Look at the dimension types.

Want to add a bunch of Botania stuff to my loot tables or remove the shulker boxes? They're in loot_tables\chests. The format is pretty easy to read and every mod will be the same.

Want to change a crafting recipe? Right there. Recipes are also a fairly easy format that is well documented. Want to add "bop:mud_brick" to the list of valid blocks for portal frames? See tags/blocks/portal_frame_blocks.json.

I'll leave a link to the official documentation of datapacks here: https://minecraft.fandom.com/wiki/Data_pack

Since you're just learning you'll naturally want to experiment. You can change datapacks while you're playing the game with the /reload command.

Remember, you should delete any files that you don't change. Otherwise if the mod (or minecraft) updates then your out of date copies will continue to override the newer files with the old ones. Happy modding!