Recipe Components - SlimeKnights/Mantle GitHub Wiki
This page describes additional common JSON recipe features that Mantle supports.
Table of Contents |
---|
String representing the registry name of an object in the game. Format is always <domain>:<name>
, where <domain>
typically represents a mod or datapack ID, and <name>
is the specific name for this object. Valid characters are any lowercase letter, any number, -
, _
, and /
. A single :
is allowed between the domain and name.
Vanilla recipe input. Can be either an item stack or a tag, or additional custom types added by mods. Mantle adds a few custom ingredient types that work in any recipes with ingredient support.
Ingredient that matches a fluid container containing exactly a specified fluid amount. This ingredient also requires that emptying the container is the same as the result of ItemStack::getContainerItem
as there is no API in Forge for an ingredient to specify what it does when drained.
-
type
(string): Alwaysmantle:fluid_container
-
fluid
(FluidIngredient): Fluid to match. Must be an exact match -
display
(Ingredient): Ingredient to display items in recipe views such as JEI. Typically a good idea to find a container which holds the desired amount of fluid.
Ingredient that matches anything matched by all the contained ingredients.
-
type
(string): Alwaysmantle:intersection
-
ingredients
(array): List of Ingredients. For a result to match, it must match all contained ingredients
Ingredient that matches anything in the first ingredient that is not in the second.
-
type
(string): Alwaysmantle:without
-
base
(Ingredient): The main ingredient to match. Anything matching this ingredient but not matchingwithout
is valid. -
without
(Ingredient): Ingredient to exclude.
A fluid recipe input. The input can be either an object, or an array of fluid ingredient objects.
-
name
(string): The fluid's registry name. Cannot be used alongsidetag
-
tag
(string): Fluid tag to match. Cannot be used alongsidename
-
amount
(integer): The fluid amount in millibuckets.
Matches 144mb of molten gold from Tinkers' Construct:
"fluid": {
"name": "tconstruct:molten_gold",
"amount": 144
}
Matches 1000mb of water from Minecraft or 500mb of any fluid tagged as steam:
"fluid": [
{
"name": "minecraft:water",
"amount": 1000
},
{
"tag": "forge:steam",
"amount": 500
}
]
An entity. Used for entity melting. The input can be either an object, or an array of entity ingredient objects.
Any of these three keys can be set, but no more than one.
-
type
: Registry name of the entity type. -
types
: An array of entity type registry names. -
tag
: Entity type tag.
Matches the creeper entity
"entity": {
"type": "minecraft:creeper"
}
Matches any entity tagged as skeletons or the skeleton horse:
"entity": [
{
"tag": "minecraft:skeletons"
},
{
"type": "minecraft:skeleton_horse"
}
]
Matches villagers or wandering traders:
"entity": {
"types": [
"minecraft:villager",
"minecraft:wandering_trader"
]
}
Similar to Ingredient, but needs at least amount_needed
of the ingredient to be present.
-
ingredient
(Ingredient): Optional, if missing, the whole object is considered an ingredient. Determines the matched ingredient -
amount_needed
(integer): Defaults to 1. The amount ofingredient
needed for the recipe.
Matches a single iron reinforcement from Tinkers' Construct:
{
"item": "tconstruct:iron_reinforcement"
}
Matches 9 or more cobalt nuggets from Tinkers' Construct:
{
"ingredient": {
"item": "tconstruct:cobalt_nugget"
},
"amount_needed": 9
}
Used for recipe outputs to allow crafting a result from a tag, used for better mod support.
-
item
: Item registry name. Used for a strict item output. Cannot be used alongsidetag
-
tag
: Forge tag. Result will be the highest priority item in the tag, as determined by Mantle's config. Cannot be used alongsideitem
-
count
: Integer. Defaults to 1. The item count. -
nbt
: NBT for the item. Only available ifitem
is set
Return the highest priority invar ingot:
"result": {
"tag": "forge:ingots/invar"
}
Return the Tinkers' Construct copper ingot:
"result": {
"item": "tconstruct:copper_ingot"
}
Similar to FluidIngredient, but cannot take a tag (the fluid must be exact). Not added by Mantle, but Mantle adds serializing and deserializing support in RecipeHelper.
"result": {
"fluid": "tconstruct:molten_electrum",
"amount": 288
}