Ingredients
An ingredient represents an input to a recipe or other piece of data. All vanilla and modded recipes should support ingredients and can use any of the following ingredients. It must be a JSON object with one of the following keys:
- An
itemkey with the registry name of an item. - A
tagkey with the registry name of an item tag. - A
typekey with the name of a custom ingredient type.
In addition to the two ingredients added by Minecraft, TFC adds a number of custom ingredients which can be used anywhere an Ingredient is required, even by other mod’s recipes. TFC adds the following ingredient types:
And
An ingredient which combines multiple ingredients together using AND logic. The item must match all child ingredients to be accepted. This is used to combine an item or tag with modifier ingredients like Heat, Not Rotten, or Has Trait.
type:tfc:andchildren: A list of Ingredients that must all match.
Example
// An ingredient which only accepts non-rotten minecraft:steak
{
"type": "tfc:and",
"children": [
{ "item": "minecraft:steak" },
{ "type": "tfc:not_rotten" }
]
}
// An ingredient which only accepts minecraft:iron_ingots if they are heated above 300 C
{
"type": "tfc:and",
"children": [
{ "item": "minecraft:iron_ingot" },
{ "type": "tfc:heat", "min": 300 }
]
}
Fluid Content
An ingredient which expects an item to contain a fluid (such as a bucket). It has the following fields:
type:tfc:fluid_contentfluid: A Sized Fluid Ingredient, which must match the fluid contained in the item.
Example
// An ingredient which accepts any item containing at least 100 mB of water
{
"type": "tfc:fluid_content",
"fluid": {
"amount": 100,
"ingredient": { "fluid": "minecraft:water" }
}
}
Has Trait
This is an ingredient which only accepts food items if they have a specific trait. It has the following fields:
type:tfc:has_traittrait: String. The registry name of a Food Trait which must be present.
Example
// An ingredient which only accepts any brined food item
{
"type": "tfc:has_trait",
"trait": "tfc:brined"
}
// An ingredient which only accepts a brined tfc:food/apple (using tfc:and)
{
"type": "tfc:and",
"children": [
{ "item": "tfc:food/apple" },
{ "type": "tfc:has_trait", "trait": "tfc:brined" }
]
}
Heat
This is an ingredient which only accepts items if they are currently within a certain temperature range. At least one of min or max must be specified. It has the following fields:
type:tfc:heatmin: Optional number. The minimum temperature this item must have, in degrees Celsius. Defaults to no minimum.max: Optional number. The maximum temperature this item must have, in degrees Celsius. Defaults to no maximum.
Example
// An ingredient which only accepts any item heated above 500 C
{
"type": "tfc:heat",
"min": 500
}
Lacks Trait
This ingredient is the same as Has Trait but is inverted. It tests if a food lacks a specified trait.
type:tfc:lacks_traittrait: String. The registry name of a Food Trait which must not be present.
Example
// An ingredient which only accepts food items that have not been brined
{
"type": "tfc:lacks_trait",
"trait": "tfc:brined"
}
Not Rotten
This is an ingredient which only accepts food items if they are not rotten. It has no additional fields.
type:tfc:not_rotten
Example
// An ingredient which only accepts non-rotten minecraft:steak (using tfc:and)
{
"type": "tfc:and",
"children": [
{ "item": "minecraft:steak" },
{ "type": "tfc:not_rotten" }
]
}
Rotten
This is an ingredient which only accepts food items if they are rotten. It has no additional fields.
type:tfc:rotten
Example
// An ingredient which accepts any rotten food
{
"type": "tfc:rotten"
}
Sized
This ingredient lacks a type, and is added by NeoForge. To use it, simply add a count to the ingredient.
count: A positive Integer specifying how much of the item is needed.
Example
// An ingredient used in the clay knapping type
{
"count": 5,
"tag": "tfc:clay_knapping"
}