-
Notifications
You must be signed in to change notification settings - Fork 8
Custom Food Values for Items or Tags (Previous Version)
Crock Pot use datapack to define Food Values. So, if you want to custom Food Values for items or tags, you need to create a datapack first.
First, you need to create folder crock_pot_food_values
in your datapack. And then you can create JSON files to define Crock Pot Food Values.
The syntax format is as follows.
type
: A string value used to describe the type of the Food Values. It should beitem
ortag
.
item
: A string value used to describe the specified item of the Food Value definition. It should be the namespace id of the item. It's required if the type isitem
.
tag
: A string value used to describe the specified tag of the Food Value definition. It should be the namespace id of the tag. It's required if the type istag
.
values
: A JSON object used to describe the food value.
- The key should be
MEAT
,MONSTER
,FISH
,EGG
,FRUIT
,VEGGIE
,DAIRY
,SWEETENER
,FROZEN
andINEDIBLE
.- The value should be a float value, we recommend that the value should be a multiple of 0.25 and preferably not more than 4.
Here are two examples in Crock Pot mod.
{
"type": "item",
"item": "minecraft:cod",
"values": {
"FISH": 0.5,
"MEAT": 0.5
}
}
{
"type": "tag",
"tag": "forge:rods/wooden",
"values": {
"INEDIBLE": 1.0
}
}
Note that food values have a priority, specifically the more 'detailed' the description of a food value, the higher the priority. For example, the item type will always have the highest priority and the priority of the tag type will depend on the number of "/"s in the tag, the more "/"s the higher the priority.
If you want to override the food value that Crock Pot has defined, just create your datapack with the namespace crockpot
and override the specified JSON file.
In the previous version, you cannot redefine Food Values for the item or tag that has been defined.