Common Types

Below are a number of common types used by recipes and custom data.


Block Ingredients

This represents a predicate on blocks in the world. It can be any of the following options:

  • A String, with the registry name of a single block.
  • A JSON object, with a single block key, with the registry name of a single block.
  • A JSON object, with a single tag key, with the name of a block tag to match.
  • A JSON object, with a type key which specifies a custom block ingredient type to use.
  • A JSON array, whose entries are Block Ingredients, which are logically OR’d together.

Note: TFC only adds the tfc:block and tfc:tag types, which are already usable via the above syntaxes for block and tag, and as a result, are not detailed here. Addons may define other block ingredient types.


Block State

A block state represents an output of a recipe in world. It must be a string which encodes a block. It must contain the registry name of the block, optionally followed by properties with key value pairs separated by =, within square brackets. For example:

  • minecraft:dirt : Just specifying a block name.
  • minecraft:grass_block[snowy=true] : Using the snowy=true property.
  • minecraft:oak_stairs[facing=north,half=bottom,shape=straight,waterlogged=false] : Using multiple properties.

Fluid Ingredients

A fluid ingredient represents a predicate of fluids. It can be any of the following options:

  • A String, with the registry name of a single fluid.
  • A JSON object, with a single fluid key, with the registry name of a single fluid.
  • A JSON object, with a single tag key, with the name of a fluid tag to match.
  • A JSon array, whose entries are Fluid Ingredients, which are logically OR’d together.

Fluid Stack

A fluid stack is used to represent a combination of a single fluid with an amount. It is a JSON object which has the following fields:

  • fluid: String. The registry name of a Fluid.
  • amount: Integer. The amount of the fluid stack, in mB.

Example

// A fluid stack representing a bucket of water
{
    "fluid": "minecraft:water",
    "amount": 1000
}

Fluid Stack Ingredients

A fluid stack ingredient is a combination of a fluid ingredient with an amount. It is a JSON object which has the following fields:

  • ingredient: A Fluid Ingredient
  • amount: Integer. An amount in mB for this ingredient. Defaults to 1000 mB.

Example

// A fluid stack ingredient which matches a bucket of water
{
    "ingredient": { "fluid": "minecraft:water" },
    "amount": 1000
}

Food Traits

A food trait is a String, which must be one of the following options. Note addons may add other food traits not in this list:

  • tfc:salted, tfc:pickled, tfc:brined, tfc:preserved, tfc:vinegar, tfc:charcoal_grilled, tfc:wood_grilled, tfc:burnt_to_a_crisp

Item Stack Ingredients

An item stack ingredient is a combination of an ingredient, and a count. It is a JSON object with the following fields:

  • count: An optional integer (Default: 1) The count of the item.
  • ingredient: An Ingredient.

Example

// An item stack ingredient which requires 5 x minecraft:apple
{
    "count": 5,
    "ingredient": {
        "item": "minecraft:apple"
    }
}

Item Stack Providers

An item stack provider represents an output of a recipe, an item stack with any number of transformations applied to it at recipe completion. These transformations are applied sequentially, starting with the provided stack. It is a JSON object with the following fields:

  • stack: An Item Stack This represents the starting stack before transformations are applied.
  • modifiers: An array of Item Stack Modifiers. Each modifier is applied sequentially to the output stack, and at the end, the final result is used as the output of the item stack provider.

Note: Any Item Stack will be accepted as a valid item stack provider with no modifiers, if neither the stack or modifiers keys are present.

Example

// An item stack provider which produces a minecraft:steak,
// but copies the food traits and expiration date from the input, and sets the temperature to 400 C
{
    "stack": {
        "item": "minecraft:steak",
        "count": 1
    },
    "modifiers": [
        { "type": "tfc:copy_food" },
        {
            "type": "tfc:add_heat",
            "temperature": 400
        }
    ]
}

Item Stacks

This represents a vanilla Minecraft item stack. It is a JSON object with the following fields:

  • item: String. The registry name of the item in the stack.
  • count: Integer. The count of the item stack.
  • nbt: An optional object representing NBT data to be added to the item stack.

Example

// An item stack of 3 x minecraft:apple
{
    "item": "minecraft:apple",
    "count": 3
}


Temperature

A temperature is a number, which corresponds to a value in degrees Celsius (°C). In-game, the tooltip displays the color based on the internal temperature value:

Temperature Range (°C) Color
1 - 80 Warming
80 - 210 Hot
210 - 480 Very Hot
480 - 580 Faint Red
580 - 730 Dark Red
730 - 930 Bright Red
930 - 1100 Orange
1100 - 1300 Yellow
1300 - 1400 Yellow-White
1400 - 1500 White
> 1500 Brilliant White