🏠
Home
🎨
Creative
🧮
Calculation
🖥️
Server
Dashboard

Minecraft Data Pack Tutorial - Complete Creation Guide

Master Minecraft data pack creation with our comprehensive tutorial. Learn to create custom functions, loot tables, recipes, advancements, and world generation features for modern Minecraft servers and gameplay enhancement.


🎯 Select Your Minecraft Version

Choose your Minecraft version to get the correct pack format and features

1.21.9 Upcoming
Pack Format: 86

Latest format with minor version support

1.21.7 – 1.21.8 Current
Pack Format: 81

Current stable format

1.21.6 Stable
Pack Format: 80

Stable with cloud height support

1.21.5 Stable
Pack Format: 71

Major overhaul with component changes

1.21.4 Legacy
Pack Format: 61

TNT minecart and furnace changes

1.21.2 – 1.21.3 Legacy
Pack Format: 57

Attribute and component updates

1.21 – 1.21.1 Legacy
Pack Format: 48

Data-driven enchantments

1.20.5 – 1.20.6 Legacy
Pack Format: 41

Item components and recipe changes

1.20.3 – 1.20.4 Legacy
Pack Format: 26

Text parsing and grass renaming

1.20.2 Legacy
Pack Format: 18

Function macros introduced

1.20 – 1.20.1 Legacy
Pack Format: 15

Sign NBT and advancement changes

1.19.4 Legacy
Pack Format: 12

Damage types added

1.19 – 1.19.3 Legacy
Pack Format: 10

Filter sections and locate merge

1.18.2 Legacy
Pack Format: 9

Structure location changes

1.18 – 1.18.1 Legacy
Pack Format: 8

Loot function string requirements

1.17 – 1.17.1 Legacy
Pack Format: 7

Replace item command changes

1.16.2 – 1.16.5 Legacy
Pack Format: 6

Custom world generation added

1.15 – 1.16.1 Legacy
Pack Format: 5

Predicates introduced

1.13 – 1.14.4 Legacy
Pack Format: 4

Initial data pack format

🚀 Data Pack Creation Tutorial

Follow these steps to create your first Minecraft data pack

📁

Setting Up Your Data Pack

📂 Finding Your World Directory

🪟 Windows

Press Win + R, type %APPDATA%\.minecraft\saves\(your world)

C:\Users\YourName\AppData\Roaming\.minecraft\saves\YourWorld\datapacks
🍎 macOS

Press Cmd + Shift + G, navigate to ~/Library/Application Support/minecraft/saves/(your world)

~/Library/Application Support/minecraft/saves/YourWorld/datapacks
🐧 Linux

Press Ctrl + L, navigate to ~/.minecraft/saves/(your world)

~/.minecraft/saves/YourWorld/datapacks

📁 Required Folder Structure

📁 YourDataPack/
📄 pack.mcmeta (required)
🖼️ pack.png (optional icon)
📁 data/
📁 your_namespace/
📁 function/
📁 loot_table/
📁 recipe/
📁 advancement/
⚙️

Creating pack.mcmeta

⚙️ Understanding pack.mcmeta

The pack.mcmeta file is the only mandatory file in your data pack. It tells Minecraft about your pack's compatibility and description.

📋 File Structure Breakdown
"description": Text shown when hovering over your pack in-game
"pack_format": Version compatibility number (see version selector above)
"supported_formats": Range of compatible versions (optional, since 1.20.2)
⚠️ Important Notes
  • File must be named exactly pack.mcmeta (not .txt!)
  • Check file extensions are visible in your OS
  • JSON syntax must be perfect (brackets, commas, quotes)
  • Use the version selector above to get the correct format
  • 💡 You can use § symbol in description for color codes!
  • ⚙️ supported_formats is optional (1.20.2+) but recommended
🏷️

Creating Your Namespace

🏷️ Creating Your Namespace

Namespaces prevent conflicts between different data packs and organize your content effectively.

📝 Naming Rules
my_awesome_pack
skyblock_tools
My Awesome Pack (spaces not allowed)
minecraft (reserved namespace)
🎯 Best Practices
  • Use lowercase letters, numbers, underscores, hyphens
  • Make it unique and descriptive
  • Avoid "minecraft" namespace (reserved for vanilla)
  • Use your username or project name
📝

Adding Content

📝 Adding Your First Content

Start with a simple function to test your data pack setup.

⚡ Create Your First Function

File: data/your_namespace/function/hello.mcfunction

# My first data pack function
say Hello from my data pack!
give @s diamond 1
title @s title {"text":"Welcome!","color":"gold"}
🧪 Testing Your Data Pack
/reload Reload all data packs
/datapack list Show all loaded data packs
/function your_namespace:hello Run your function

📚 Data Pack Content Types

Explore different types of content you can create in your data pack

Functions

Beginner

Command sequences that can be executed

Folder: function
Extension: .mcfunction
💰

Loot Tables

Intermediate

Define what drops from mobs or containers

Folder: loot_table
Extension: .json
🔨

Recipes

Beginner

Custom crafting and smelting recipes

Folder: recipe
Extension: .json
🏆

Advancements

Intermediate

Achievement system with rewards

Folder: advancement
Extension: .json
🏗️

Structures

Advanced

Custom building structures

Folder: structure
Extension: .nbt
🌍

World Generation

Expert

Custom terrain and biome generation

Folder: worldgen
Extension: .json
🏷️

Tags

Beginner

Group items, blocks, or entities

Folder: tags
Extension: .json
🎯

Predicates

Advanced

Conditions for commands and loot tables

Folder: predicate
Extension: .json

🚀 Advanced Data Pack Features

🔄 Function Macros

Dynamic functions with parameters (1.20.2+)

$execute as $(player) run say Hello $(message)

🎨 Custom Enchantments

Data-driven enchantments (1.21+)

data/namespace/enchantment/custom.json

🌍 Dimension Creation

Custom dimensions and world generation

/execute in namespace:custom_dimension

🏗️ Structure Placement

Custom structures and jigsaw blocks

/place structure namespace:castle

⚠️ Important Version Changes

Critical changes that affect data pack compatibility

🚨 Folder Naming Changes (1.21)

Old → New

  • recipes/recipe/
  • loot_tables/loot_table/
  • functions/function/

Action Required: Update folder names when upgrading to 1.21+

📝 Recipe Format Changes (1.20.5)

Result Object Syntax

Old: "result": {"item": "minecraft:diamond"}

New: "result": {"id": "minecraft:diamond"}

Action Required: Update all recipe files

🎨 Pack Icon Support

pack.png Icon

  • Optional 128×128px PNG image
  • Place next to pack.mcmeta
  • Square aspect ratio (1:1)
  • Shows in data pack selection screen

🧪 Testing Commands

Essential Commands

  • /reload - Reload all data packs
  • /datapack list - Show loaded data packs
  • /datapack enable "file/pack_name" - Enable pack
  • /datapack disable "file/pack_name" - Disable pack

🔧 Troubleshooting Common Issues

❌ Data Pack Not Loading

Common Causes:

  • Incorrect pack.mcmeta syntax
  • Wrong folder structure
  • Invalid pack_format
  • Missing .mcmeta extension

Solutions:

  • Check JSON syntax in pack.mcmeta
  • Verify folder names are lowercase
  • Use correct pack format for your version
  • Ensure file extensions are visible

⚠️ Functions Not Working

Common Causes:

  • Wrong file extension (.txt instead of .mcfunction)
  • Incorrect namespace in command
  • Command syntax errors
  • Functions in wrong folder (use function/ not functions/)

Solutions:

  • Ensure file has .mcfunction extension
  • Use /function namespace:filename
  • Test commands individually first
  • Check for folder naming (1.21+ changes)