Wiki 9Minecraft Wiki 9Minecraft

contents.json — Pack File Index

How the optional contents.json file indexes files inside behaviour and resource packs, and when to delete it.

5Sections
2Code examples
3Known errors

The contents.json file is an optional file index that sits at the root of a Behaviour Pack or Resource Pack alongside manifest.json. Official Marketplace packs use it to support asset encryption and speed up file lookups, while community creators usually generate it by accident or delete it during troubleshooting. Understanding how the engine reads this file will save you hours of confusion when newly added textures, models, or entities refuse to show up in-game.

What contents.json Actually Does

When Minecraft Bedrock loads a pack from disk, it needs to know which files exist inside the pack folder. By default, if no contents.json file is present at the root of the pack, the game scans the directory tree directly and discovers every JSON, PNG, OGG, and script file on its own.

However, if a contents.json file exists next to manifest.json, the engine switches how it loads the pack. Instead of scanning the folders freely, Minecraft treats the array inside contents.json as the master list of files in the pack. If a file exists on your hard drive—say, a new block definition or item texture—but its relative path is missing from contents.json, the game can completely ignore that file as if it were never created.

For Marketplace Partners, this file is required by the submission pipeline. The encryption process puts a binary header on contents.json and attaches per-file encryption keys to the entries inside it. For standard community add-ons distributed as .mcpack or .mcaddon archives, contents.json is completely optional.

File Location and Structure

A contents.json file belongs in the root directory of a pack, right next to manifest.json. If your project has both a Behaviour Pack and a Resource Pack, each pack has its own separate contents.json listing only the files inside that specific pack.

In an unencrypted pack, the structure is minimal: a top-level JSON object containing a version integer and a content array. Every item in the content array is an object with a path property pointing to a file relative to the pack root, always using forward slashes.

FieldWhat it doesNotes
versionDeclares the format version of the index file.Always set to integer 1.
contentArray of file entry objects belonging to the pack.Every file you want the pack to load should be listed here if contents.json is present.
pathThe file path relative to the root folder of the pack.Must use forward slashes (/), never Windows backslashes (\). Do not include a leading slash.
RP/contents.json
{
  "version": 1,
  "content": [
    {
      "path": "manifest.json"
    },
    {
      "path": "pack_icon.png"
    },
    {
      "path": "textures/terrain_texture.json"
    },
    {
      "path": "textures/blocks/custom_slate.png"
    },
    {
      "path": "texts/en_US.lang"
    }
  ]
}

Behaviour Pack Example

A Behaviour Pack uses the exact same schema as a Resource Pack. When present at BP/contents.json, it lists server-side files such as entities, blocks, items, loot tables, functions, and script files.

Notice that folder names themselves are not given their own entries; only actual files with extensions are listed in the content array.

BP/contents.json
{
  "version": 1,
  "content": [
    {
      "path": "manifest.json"
    },
    {
      "path": "pack_icon.png"
    },
    {
      "path": "blocks/custom_slate.json"
    },
    {
      "path": "loot_tables/blocks/custom_slate.json"
    },
    {
      "path": "scripts/main.js"
    }
  ]
}

Do You Need It During Development?

For almost all day-to-day add-on development, the answer is no. In fact, keeping a static contents.json in your development folder is one of the most common causes of silent bugs. Whenever you add a new file to your pack while a stale contents.json sits at the root, you risk the game ignoring your new file until you either update the index or delete it.

Sometimes Minecraft itself or third-party pack editors will auto-generate a contents.json file inside packs placed in the development_behavior_packs or development_resource_packs folders. If you export a template or copy an existing pack to start a new project, you will often inherit an old contents.json without realizing it.

Unless you are actively testing a build pipeline that automatically regenerates contents.json on every save, the best workflow during development is to simply delete BP/contents.json and RP/contents.json. Minecraft will fall back to reading your folders directly.

Encrypted Marketplace Packs

If you open a downloaded Marketplace pack in a text editor, its contents.json will not look like a normal text file. The file begins with a binary header followed by encrypted payload data. Inside that encrypted data, the content array holds additional metadata used by the game's DRM system to decrypt individual assets in memory.

Community creators cannot generate valid encrypted contents.json files on their own and do not need to. If you see garbage characters at the top of a contents.json file, you are looking at an encrypted pack.

Which versions this applies to

Applies to all modern Minecraft Bedrock versions (1.16.0 through current releases). No experimental toggles are required.

When it does not work

What you seeWhyThe fix
Newly added entities, blocks, or textures are completely ignored by the game with no Content Log errors.An old contents.json file exists in the root of your pack and does not include the paths to the new files you just created. Because contents.json is present, the game trusts that list instead of scanning your folders for new files.Delete contents.json from your BP and RP root folders so Minecraft scans the directories directly, or regenerate the file so all new paths are included.
[Json][error] Failed to parse contents.json in the Content Log, or the pack fails to load assets after manual editing.You manually added a file path on Windows and copied the path with backslashes (for example, "textures\blocks\slate.png"). In JSON, a backslash starts an escape sequence like \b or \t, which either breaks JSON parsing or corrupts the path string.Replace all backslashes (\) with forward slashes (/) in every path entry, or delete contents.json entirely.
Opening contents.json in a code editor shows unreadable binary symbols and the JSON parser reports a syntax error on line 1.The file comes from an encrypted Marketplace pack. Encrypted contents.json files have a binary header prepended to the file and cannot be parsed as plain text JSON.Do not copy contents.json from Marketplace or store packs into your own add-on. Delete the file from your custom pack.

Reference, straight from the game files

Read out of the game itself, so the ids match the version you are building for.