-
Notifications
You must be signed in to change notification settings - Fork 8
Full guide to add frying & cooking recipe
First to know, we use a special tag-based system and counting system to decide recipes. You can always add items into our tags to make them useful inside the recipe. If you want to make your very custom recipe, read below.
If you want to add your own tag to our recipe system, you can use the counting tags (caupona:tags
) recipe.
Example:
{
"type":"caupona:tags",
"tag":"modid:tag",
"tags":["modid:tag1","modid:tag2"]
}
Param | Description |
---|---|
type | is tag recipe |
tag | Specify one tag to add, if specified, ignore tags
|
tags | Specify some tags to add, conflict with tag. |
This would cause the system to count your tag or tags in the recipe system. You can use this to disturb other recipes without modify them. Like condition more than half and/or majority. If your added tag take majority or more than half, then that recipe would not take effect.
This is only for tags that aren't in the recipes. If you use your tag anywhere in stew/fry recipe, this would be auto generated when game loads. So there is no need to write this recipe usually.
By default, the mod reads smoking recipes and generate a recipe table, and mark what can be cooked and get the best cooked item by hunger. During this process, all counting tags of items before cook and cooked into would be added to the ingredient in caupona.
For example, raw beef have a forge:raw_beef
tag, and cooked beef have a forge:cooked_beef
tag, then both raw beef and cooked beef will consider have both forge:raw_beef
and forge:cooked_beef
tag during recipe handling. So only choose one tag to write in recipe is enough.
This have another effect: raw materials would consider cooked during cook in pot or pan, this make cooking more realistic. But cooking raw materials also increases total cooking time, the time is computed by adding up all smoking time cost on the path from raw to cooked.
This process is convenient but it may not always needed, to override this process, a food value recipe is present:
For example:
{
"type": "caupona:food",
"heal": 3,
"item": {
"item": "minecraft:red_mushroom"
},
"items": [
{
"item": "minecraft:brown_mushroom",
"time": 0
},
{
"item": "minecraft:red_mushroom"
}
],
"sat": 0.6,
"effects": [
{
"level": 2,
"time": 400,
"effect": "minecraft:poison",
"chance": 1.0
},
{
"level": 1,
"time": 1200,
"effect": "minecraft:hunger",
"chance": 1.0
},
{
"level": 0,
"time": 400,
"effect": "minecraft:nausea",
"chance": 1.0
}
],
}
Param | Description |
---|---|
type | is food value recipe |
item | Item that represent this recipe, not used currently. By default, it would use first item in below, so it is not necessary to write this. |
items | A item-time pair to mark items, if written, the recipe system would make items inside to follow this recipe. time is used to specify additional cooking time when cooked. |
heal | Hunger healing, see minecraft wiki for detail |
sat | Saturation modifier, see minecraft wiki for detail |
effects | list of effects to add, see minecraft wiki for detail |
This recipe can overwrite food status of other items, and add effects, healing, saturation values to them without modify the original item. And also able to build a mechanic that unedible raw food can be cooked into edible dishes.
Moreover, if item specify inside can be smoked from other material, that material would also added into this recipe automatically. However, if item specify inside this recipe can be smoked into other material, the other material would be ignored, so you can disable auto cook of some item by adding them into this recipe.
With the example recipe, if you cooked mushroom inside a stew pot or pan, it would give you 3 hunger healing and 0.6 saturation modifier, however, you have a 100% chance to gain poison II for 20 seconds.
We also have a fluid version of ingredient recipe.
{
"type": "caupona:fluid_food",
"fluid": "caupona:scalded_milk",
"heal": 0,
"item": {
"item": "minecraft:milk_bucket"
},
"effects":[
{
"level": 0,
"time": 400,
"effect": "minecraft:nausea",
"chance": 1.0
}
]
"parts": 4,
"sat": 1.0
}
Param | Description |
---|---|
type | is fluid food recipe |
fluid | Type of fluid |
item | A represent item for this fluid, with diet mod, diet value of this fluid would be a copy of this item. |
parts | How many bowl of fluid can the represent item, diet value of this fluid would also divide by this. |
sat/heal | Same as above |
effects | Same as above |
Dissolve recipe is aim to add cooking time for some ingredient, and also disable all automatic recipe handling for it but not override its food value.
This recipe is deprecated, use food value recipe instead.
For example:
{
"type": "caupona:dissolve",
"item": {
"tag": "forge:cereals/corn"
},
"time": 10
}
Param | Description |
---|---|
type | is dissolve recipe |
item | Ingredient of this recipe |
time | Additional cooking time to add |
This would make all corns would not be automatically cooked, and also add 10 ticks to boil.
This is useful when you don't want something to cooked automatically. Such as most mods would make cooked corn pop corn, this would not happen when cooked inside the stew.
If you are any sort of mod developer, use builders under com.teammoeg.caupona.datagen
instead of writing json.
Cooking and Frying recipe are condition based, they just carry a lot of conditions instead of specify each condition within it. Let's introduce condition first.
Stew base condition limits the base of stew, and also specify a way to modify base.
{
"tag": "modid:tagname1",
}
Represents base type or fluid type should have corresponding tag. If fluid type equals provided type, base type of the fluid would be set to provided type.
{
"fluid": "modid:fluid_type",
}
This Represent the fluid type or base type should be the provided type. If fluid type equals provided type, base type of the fluid would be set to provided type.
{
"fluid_type": "modid:fluid_type",
}
This Represent the fluid type must be the provided type. And would change base type to provided type.
Ingredient conditions specify a predicate to determine wether ingredients fits.
Numbers are used inside ingredient condition to provide a way to count ingredients.
Computed Number during a recipe check would be cached, so it would be performance friendly to use the same number repeatly.
Item Tag means get total count of specified tags from all ingredients.
It can be a plain string "modid:tag"
or
{
"tag":"modid:tag"
}
They are the same.
Item Type means get total count of specified item.
{
"item":"modid:item"
}
This always return the provided constant integer number. It can be only a number like 1
.
Ingredient means getting total count of ingredients that fits the ingredient.
{
"ingredient":{"item":"modid:item"},
"description":"lang.key"
}
Param | Description |
---|---|
ingredient | Provide a ingredient to check. |
description | Can be language key or plain text, used in patchouli manual and JEI Page. |
Sum means getting a sum of a given list of number. It can be in a array:
[
1,
"modid:tag",
...
]
Or
{
"types":[
1,
"modid:tag",
...
]
}
Leave any number null or empty would cause a Nop Number, Always return 0.
Conditions would check a number if it satisfis the condition. Mainly and Half are exclusive conditions, they can't be satisfy by different tags or items inside one recipe.
type
is number mentioned above in conditions.
Mainly require the number greater than 1/3 of all ingredient and greater than count of any other counting tags.
{
"type": "caupona:meats/meat",
"cond": "mainly"
}
Half require the number greater than half of all ingredient
{
"type": "caupona:eggs",
"cond": "half"
},
Mainly of require the number greater than 1/3 of given tag and greater than cont of any other counting tags presents in the same ingredient with this tag.
{
"type": "caupona:vegetables/pumpkin",
"cond": "mainlyOf",
"tag": "caupona:vegetables"
}
Tag means the tag type count as all ingredient.
Contains requires the number greater than 0.
{
"type": "caupona:vegetables",
"cond": "contains"
},
Only requires the number equals total ingredient count.
{
"type": {
"item": "minecraft:bone"
},
"cond": "only"
}
Cooking Recipe means cooking stew inside pot.
{
"type": "caupona:cooking",
"allow": [
{
"type": "forge:raw_beef",
"cond": "mainly"
},
{
"type": "caupona:vegetables",
"cond": "contains"
}
],
"base": [
{
"fluid": "caupona:stock"
}
],
"density": 0.75,
"deny": [
{
"type": "caupona:seafood",
"cond": "contains"
},
{
"type": "caupona:cereals",
"cond": "contains"
}
],
"output": "caupona:goulash",
"priority": 1152,
"time": 200,
"removeNBT":false
}
Param | Description |
---|---|
type | is cooking recipe |
allow | Ingredient conditions must be satisfied. Only if all allowed conditions satisfied does this recipe take effect |
base | Base condition. Any base condition satisfied would allow this recipe to take effect |
deny | Ingredient conditions should not be satisfied. Only if all denied conditions unsatisfied does this recipe take effect |
density | Minimum density required for this recipe in items per bowl. |
output | Output fluid type for this recipe. |
priority | Priority value of this recipe. Recommended values: 1024 for most specific recipes.128 for higher priority recipes. 64 for basic recipes. Negative for fallback and default recipes. You can add them up and add a small number to create final priority value. |
time | Additional cooking time of this recipe. |
removeNBT | Does this recipe removes NBT after recipe complete, useful for mod compatible. |
Frying Recipe means frying inside pan.
{
"type": "caupona:frying",
"allow": [
{
"type": "caupona:vegetables/roots",
"cond": "mainly"
}
],
"deny": [
{
"type": "caupona:seafood",
"cond": "contains"
}
],
"output": "caupona:sauteed_roots",
"priority": 128,
"time": 200,
"removeNBT":false
}
Param | Description |
---|---|
type | is frying recipe |
allow | Ingredient conditions must be satisfied. Only if all allowed conditions satisfied does this recipe take effect |
deny | Ingredient conditions should not be satisfied. Only if all denied conditions unsatisfied does this recipe take effect |
output | Output item type for this recipe. |
priority | Priority value of this recipe. Recommended values: 1024 for most specific recipes.128 for higher priority recipes. 64 for basic recipes. Negative for fallback and default recipes. You can add them up and add a small number to create final priority value. |
time | Additional cooking time of this recipe. |
removeNBT | Does this recipe removes NBT after recipe complete, useful for mod compatible. |