-
Notifications
You must be signed in to change notification settings - Fork 13
Adding Content
To add content, you'll have to create a new file called main.json. This file contains everything that is being added to the game. However you can outsource anything to another file. Every json file consists of named lists, where each entry in these lists adds one or more things of the same type, for example shaped recipes.
For a simple smelting recipe the file might look like this:
{
"content": [
{
"type": "smeltingRecipe",
"entries": [
{
"input": "minecraft:stone",
"result": "minecraft:obsidian"
}
]
}
]
}The name of the list, content here, is completely arbitrary and just adds a little more structure. You could have a list for recipes and another one for fuel.
That's all you need to do add some content.
If you want to use multiple files, for example to have recipes in its own file, you can do this:
{
"content": [
{
"file": "recipes.json"
}
]
}Files loaded that way work exactly the same as main.json. This means you can a file load another file which then itself loads some files. For example, you can let recipes.json load crafting_recipes.json and smelting_recipes.json.
You can also add conditions to a content entry to only load that content if the conditions are met. You can, for example, only add certain recipes if a specific mod is loaded:
{
"content": [
{
"file": "recipes.json",
"requireModsLoaded": ["chesttransporter"],
"requireModsNotLoaded": ["morefurnaces"],
}
]
}This works for both file and entries.
The content is only loaded if all conditions are met. In the example above, chesttransporter has to be loaded and morefurnaces must not.
More Tutorials: