contents.json
contents.json
is a file that is probably used for the game to process the pack files more easily. It is probably intended for marketplace content creators and Mojang, it is not required to have this file in the pack for the pack to work properly.
You will find there some instructions about the usage of this file.
Structure of the file
contents.json
is located at the root of the add-on directory. It contains a list of the files that are included in the pack. Example:
{
"content": [
{
"path": "texts/en_US.lang"
},
{
"path": "contents.json"
},
{
"path": "manifest.json"
},
{
"path": "animations/my_animation.animation.json"
},
{
"path": "animation_controllers/my_ac.ac.json"
},
{
"path": "entity/my_entity.entity.json"
},
{
"path": "textures/textures_list.json"
},
{
"path": "textures/blocks/my_block.png"
}
]
}
- 🈵en_US.lang
- 📝manifest.json
- 📝contents.json
- 📝my_animation.animation.json
- 📝my_ac.ac.json
- 📝my_entity.entity.json
- 📝texture_list.json
- 🖼️my_block.png
Automatizing the process
The contents.json
file can be generated automatically by the game itself, it is very recommended to decrease the risks of making mistakes. However, the file must be prepared first. Create a new empty file called contents.json
in the root directory of your add-on, and add empty brackets.
{}
The file content will be automatically written next time the game is launched.
Additional information
- The automatic process can be achieved no matter what is the location of the pack (Development folders or normal folders).
- Do not make multiple
contents.json
for subpacks, the file at the root of the pack is sufficient. - This file is not required for the add-on to work properly.