Skip to content

Pack format

Martijn Muijsers edited this page Dec 23, 2024 · 28 revisions

Structure

A pack contains:

  • pack.mcmeta
            Pack information, such as the pack name and author
  • assets folder
            Same as resource packs: e.g. textures and models for your custom blocks and items
  • data folder
            Same as data packs: e.g. crafting recipes, loot tables and tags for your custom blocks and items
  • content folder
            Custom blocks and item properties, e.g. type of block (cube, stairs, slab etc.) and explosion resistance

pack.mcmeta

This file contains information about the pack. This is similar to (but not the same as!) the pack.mcmeta file in resource and data packs.

JSON format (* = required):

pack*
object
supported_formats*
integer | [ integer ] | object
The formats of Fiddle pack that are supported.
The current format is 2, so that is the version you should use for new packs.

This can be a single integer, a list of integers, or an object denoting an inclusive range.
Examples:
  • "supported_formats": 2
    to indicate support for version 2
  • "supported_formats": [1, 3]
    to indicate support for versions 1 and 3
  • "supported_formats": {"min_inclusive": 2, "max_inclusive": 4}
    to indicate support for versions 2, 3 and 4

This number is not the same number as the pack_format in resource and data packs. Below is a table of which Fiddle pack version corresponds to which resource and data pack version:
Version table
Fiddle Resource pack Data pack Minecraft version
2 22 26 1.20.4
1 15 15 1.20.1

You can use overlays (with Fiddle pack versions, not data pack or resource pack versions).
uuid*
string
A unique id for this pack

This must be a UUID.
To generate a new UUID for a new pack, simply open: www.uuidgenerator.net

The unique id should never be changed.
The unique id helps a server know, even when the display name of your pack changes, that it is still the same pack.
display_name*
string
A nice human-readable name of the pack
technical_name*
string
The name of the pack to use internally

This is the name of the data pack in the /datapack command.

It can only contain lowercase letters (a-z), digits (0-9) and underscores (_).
For example, a good technical name of a pack called "Glowing Mushrooms" would be "glowing_mushrooms".
version
string
The version of your pack

You should update this for each new release of the pack, if it has changes.
This can be formatted however you like. A good version example would be "1.3" or "1.9.2"
description
string
A nice human-readable description of the pack
authors
[ string ]
The main authors of this pack
credits
[ object ]

Contributors to this pack (pixel artists etc.)
(This can also include some of the authors from above again, if you want to specify a specific role.)
name*
string
Name of the contributor
role
string
Role of the contributor (e.g. "Pixel artist")
website
string
A website for this pack (or the author's website, or a page where the pack is posted)
data_pack_description
string
Text that appears when hovering over the data pack's name in the /datapack list command

Examples

pack.mcmeta:

{
  "pack": {
    "supported_formats": 1,
    "uuid": "b8f2e967-a4c2-40h6-8b7a-e3b470d23ffb",
    "display_name": "Willows",
    "version": "1.2",
    "description": "Adds willow trees",
    "authors": [ "Martijn Muijsers" ],
    "credits": [
      {
        "name": "Enzo Mortelli",
        "role": "Model artist"
      },
      {
        "name": "Thomas Sourtzis",
        "role": "Plugin tester"
      }
    ]
  }
}

Note: There is one invalid character in the above UUID, so that you can't accidentally copy it and then forget to change it. You must generate a new UUID for your pack, for example by copying the random UUID that you see when you go to: www.uuidgenerator.net

assets

This folder is identical to the assets folder in resource packs.
Amongst others, it contains block states, models and textures.

The top-level subfolders have a namespace as name (for example assets/minecraft for vanilla resources, or assets/willows for resources for a pack named Willows).

Wiki links for some subfolders:

Examples

assets/willows/blockstates/willow_log.json (based on assets/minecraft/blockstates/oak_log.json):

{
  "variants": {
    "axis=x": {
      "model": "willows:block/willow_log_horizontal",
      "x": 90,
      "y": 90
    },
    "axis=y": {
      "model": "willows:block/willow_log"
    },
    "axis=z": {
      "model": "willows:block/willow_log_horizontal",
      "x": 90
    }
  }
}

assets/willows/models/block/willow_log_horizontal.json (based on assets/minecraft/models/block/oak_log_horizontal.json):

{
  "parent": "minecraft:block/cube_column_horizontal",
  "textures": {
    "end": "willows:block/willow_log_top",
    "side": "willows:block/willow_log"
  }
}

assets/willows/models/item/willow_sapling.json (based on assets/minecraft/models/item/oak_sapling.json):

{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "willows:block/willow_sapling"
  }
}

assets/willows/lang/en_us.json (based on assets/minecraft/lang/en_us.json):

{
  "block.willows.willow_basket": "Willow Basket",
  "block.willows.willow_log": "Willow Log",
  "block.willows.willow_planks": "Willow Planks",
  "block.willows.willow_sapling": "Willow Sapling",
  "block.willows.willow_wood": "Willow Wood",
  "block.willows.stripped_willow_log": "Stripped Willow Log",
  "block.willows.stripped_willow_wood": "Stripped Willow Wood",
  "item.willows.willow_twig_bundle": "Willow Twig Bundle"
}

data

This folder is identical to the data folder in data packs.
Amongst others, it contains crafting recipes, loot tables and tags.

The top-level subfolders have a namespace as name (for example data/willows for resources for a pack named Willows).

Wiki links for some subfolders:

Examples

data/willows/recipes/willow_planks.json (based on data/minecraft/recipes/oak_planks.json):

{
  "type": "minecraft:crafting_shapeless",
  "category": "building",
  "group": "planks",
  "ingredients": [
    {
      "tag": "willows:willow_logs"
    }
  ],
  "result": {
    "count": 4,
    "item": "willows:willow_planks"
  }
}

data/willows/tags/blocks/willow_logs.json (based on data/minecraft/tags/blocks/oak_logs.json):

{
  "values": [
    "willows:willow_log",
    "willows:willow_wood",
    "willows:stripped_willow_log",
    "willows:stripped_willow_wood"
  ]
}

data/willows/loot_tables/blocks/willow_bookshelf.json (based on data/minecraft/loot_tables/blocks/bookshelf.json):

{
  "type": "minecraft:block",
  "pools": [
    {
      "bonus_rolls": 0.0,
      "entries": [
        {
          "type": "minecraft:alternatives",
          "children": [
            {
              "type": "minecraft:item",
              "conditions": [
                {
                  "condition": "minecraft:match_tool",
                  "predicate": {
                    "enchantments": [
                      {
                        "enchantment": "minecraft:silk_touch",
                        "levels": {
                          "min": 1
                        }
                      }
                    ]
                  }
                }
              ],
              "name": "willows:willow_bookshelf"
            },
            {
              "type": "minecraft:item",
              "functions": [
                {
                  "add": false,
                  "count": 3.0,
                  "function": "minecraft:set_count"
                },
                {
                  "function": "minecraft:explosion_decay"
                }
              ],
              "name": "minecraft:book"
            }
          ]
        }
      ],
      "rolls": 1.0
    }
  ]
}

content

This folder contains the new blocks and items. For each namespace, it can contain two folders: blocks and items.

content/<namespace>/blocks

This folder contains a file for each new block type.

JSON format (* = required):

parent*
string
The parent block of this block
The parent determines which block states this block has (including their collision boxes), and inherits some of the effects of that parent.
For example, if you use "minecraft:oak_log" as parent, the block will have 3 block states (one per axis), and these will be placed correctly based on the block face that a player clicks.

The effects of the parent that will be inherited can be found on the Parents page.
properties
object
parent
string
The parent from which the properties are inherited
By default, all properties are inherited from the top-level parent value (described above), but if you would like to inherit properties from a different block, you can set this value.
For example, you could make a block more_slabs:obsidian_slab, with parent "minecraft:blackstone_slab" and properties parent "minecraft:obsidian", so that it has the same explosion resistance etc. as obsidian.
map_color
string
The map color of the block
This must be one of the existing map color names, formatted as a namespaced key, for example "minecraft:metal" or "minecraft:color_blue".
explosion_resistance
float
The explosion resistance of the block
This must be 0 or higher.
You can find the explosion resistance (als called "blast resistance") of vanilla blocks here.
destroy_time
float
The time it takes to break the block
For blocks that can be broken, this must be either 0 or higher (0 for instant break). For blocks that are unbreakable (like barrier blocks), this value can be set to -1.
You can find the destroy time (also called "hardness") of vanilla blocks here.
requires_correct_tool_for_drops
boolean
Whether this block requires the correct type of tool (for example, axe or pickaxe) for drops
The correct type of tool is determined by a block tag (for example #mineable/axe).
friction
float
How much entities slide over this block
This must be between 0.001 and 0.999 (inclusive).
For example, the default value is 0.6, but for ice it is 0.98, and for blue ice it is 0.989.
ignited_by_lava
boolean
Whether this block can catch fire when close to lava
instrument
string
The instrument played when this block is below a note block
This must be one of the existing instruments, formatted as a namespaced key, for example "minecraft:iron_xylophone" or "minecraft:creeper".
parent-specific values(*) Depending on the value of parent, there may be some other values that are possible or required. For example, for stairs blocks, an additional full_block_state value is required. You can find which additional values exist on the Parents page.

Examples

content/willows/blocks/willow_log.json:

{
  "parent": "minecraft:oak_log"
}

content/metal_working/blocks/gold_stairs.json:

{
  "parent": "minecraft:bamboo_stairs"
}

content/dirt_shapes/blocks/dirt_slab.json:

{
  "parent": "minecraft:mud_brick_slab"
}

content/<namespace>/items

This folder contains a file for each new item type.

JSON format (* = required):

parent*
string
The parent item of this item
The parent determines which properties this item has, and inherits some of the effects of that item.
For example, if you use the "minecraft:stone_bricks" as parent, the item will be a block item.

The effects of the parent that will be inherited can be found on the Parents page.
properties
object
parent
string
The parent from which the properties are inherited
By default, all properties are inherited from the top-level parent value (described above), but if you would like to inherit properties from a different item, you can set this value.
max_stack_size
int
The max stack size, between 1 and 64 (inclusive)
is_fire_resistant
boolean
If true, this item does not get destroyed from burning in fire or lava (just like netherite items)
parent-specific values(*) Depending on the value of parent, there may be some other values that are possible or required. For example, for block items, an additional block value is possible (but not required). You can find which additional values exist on the Parents page.

Examples

content/willows/items/willow_log.json:

{
  "parent": "minecraft:oak_log"
}

Clone this wiki locally