Skip to content

Recipe Types

MattiDragon edited this page Jan 29, 2022 · 7 revisions

Intro

FEN provides multiple recipe types for it's different mechanics. They are documented here so that you don't have to dig trough our code to find info about them.

If you use these in your mod and don't have a hard dependency on FEN it's recommended to use resource conditions from fapi to disable your recipe when FEN is missing.

List of Recipe Types

Barrel Composting

{
  "type": "fabricaeexnihilo:compost",
  "result": "minecraft:dirt",          // The result, can be any item stack, but works best with block.
  "input": "#minecraft:leaves",        // The item(s) use, can be any item ingredient 
  "increment": 0.125,                  // How much the compost is filled per item. 1 = full
  "color": "00AA00"                    // The color the item preview in the compost will be.
}

Fluid Combination

These recipes trigger when a fluid is in the barrel and an other one is on top.

{
  "type": "fabricaeexnihilo:fluid_combination",
  "contained": "minecraft:water",                // The fluid that is in the barrel as a fluid ingredient
  "other": "#c:brine",                           // The fluid that is on top of the barrel as a fluid ingredient
  "result": {                                    // The resulting barrel state
    "id": "item",
    "stack": "minecraft:ice"
  }
}

Fluid Transformation

These recipe trigger when a barrel with fluid in it is on top of a specific block. For example water on mycelium turns into witchwater.

{
  "type": "fabricaeexnihilo:fluid_transformation",
  "contained": "minecraft:water",                    // The fluid contained in the barrel as an ingredient
  "catalyst": "minecraft:mycelium",                  // The block under the barrel as an ingredient
  "result": {                                        // The barrel state once done
    "id": "fluid",
    "fluid": "fabricaeexnihilo:witchwater",
    "amount": 81000
  }
}

Milking

Milking recipes are triggered when an entity steps on a barrel. Afterwards the entity will get a short cooldown before it can be milked again.

{
  "type": "fabricaeexnihilo:milking",
  "entity": "minecraft:cow",           // The type of entity as an ingredient (note: tags are under 'tags/entity_types')
  "fluid": "fabricaeexnihilo:milk",    // The fluid that will be produced as an id
  "amount": 810,                       // The amount of fluid that will be produced (81000 is a bucket)
  "cooldown": 20                       // The amount of ticks the entity will be on cooldown for after milking
}

Leaking

Leaking recipes allow barrels that have a fluid in them and a block is nearby.

{
  "type": "fabricaeexnihilo:leaking", 
  "block": "minecraft:cobblestone",   // The block that will be converted as an ingredient
  "fluid": "#c:blood",                // The fluid that has to be in the barrel as an ingredient
  "amount": 8100,                     // The amount of fluid used up
  "result": "minecraft:netherrack"    // The block the target will be replace by
}

Barrel Alchemy

These recipes a multi-purpose barrel recipes for when a player uses an item on a barrel.

{
  "type": "fabricaeexnihilo:alchemy",
  "reactant": "minecraft:water",       // The fluid that is in the barrel as an ingredient
  "catalyst": "minecraft:white_wool",  // The item used on the barrel as an ingredient
  "byproduct": {                       // A loot entry that will be droped after the recipe is done, optional
    "stack": "minecraft:string",       
    "chances": [                       
      0.5,                             
      0.5,                              
      0.5                               
    ]                                  
  }                                    
  "delay": 100,                        // The amount of ticks before the recipe is done, optional
  "toSpawn": {                         // An entity stack that will be spawned one the recipe is done, optional
    "type": "minecraft:wolf"
  },
  "result": {                          // The resulting barrel state, optional
    "id": "item",
    "stack": "minecraft:white_carpet"
  }
}
Clone this wiki locally