Customizing Skeleton creation ingredients, amounts, and health with data packs - The-Fireplace-Minecraft-Mods/Overlord GitHub Wiki
This article is intended for users who are familiar with editing json files and creating data packs. If you are new to it, I suggest following this tutorial to learn before you start. If you're having issues, you might check that the syntax is correct with an online json parser.
These can be customized by adding items to the item tags. They will go in data/overlord/tags/items/
in your data pack, the file names are flesh.json
and muscle_meat.json
. The contents should follow look something like:
{
"replace": false,
"values": [
"examplemod:strange_beef",
"examplemod:some_other_item_id"
]
}
There are two ways we can do this. You probably want to replace the default recipe instead of allowing it to coexist with your new one, so I'll start with that.
The default recipe can be replaced by putting your replacement recipe at data/<yourdomain>/skeleton_recipes/standard.json
. The last one loaded will typically be used, but if you need to be certain it overrides no matter where in the load order your data pack is, there is a priority you can increase.
If you want to have multiple possible combinations of items that result in a skeleton, you can add additional recipes in data/<yourdomain>/skeleton_recipes/
with your own name for the file, just don't use standard.json if you don't intend to replace the default.
Here is the default recipe included with Overlord. Feel free to copy it and make changes.
There are four sections to the recipe, each of which corresponds to a different aspect of the skeleton. The essential section is required for a skeleton to form, and creates the base skeleton. The skin section is used to add skin to the skeleton. The muscles section adds the muscles. And the player_colors section is used to give the skeleton a player skin, after the items from the skin section have been used.
Within each section, we have three parts - ingredient, byproducts, and health. Ingredients are what are used to create the skeleton, and can be an item tag or a specific item. Byproducts are produced when that part of the skeleton is created, and can only be specific items. Health is the amount of health the skeleton gains from including that part of the recipe.
Parts of an ingredient:
"type" - can either be "tag" or "item"
"id" - the item or tag id
"count" - the number needed to make that part of the skeleton
"nbt" - if present, the nbt to check for the item. Must be an exact match. Can only be used with the "item" type.
Parts of a byproduct:
"id" - the item id
"count" - the number produced
"nbt" - if present, the nbt to add to the produced item.
NBT can be formatted in two ways.
One, it can be a compact string (like you would use with a command). This can look something like:
"nbt": "{Enchantments:[{id:smite,lvl:3},{id:sweeping,lvl:2},{id:unbreaking,lvl:3}]}"
Two, it can be in json format. This can look something like:
"nbt": {
"Enchantments": [
{
"id": "smite",
"lvl": 3
},
{
"id": "sweeping",
"lvl": 2
},
{
"id": "unbreaking",
"lvl": 3
}
]
}