ItemStack Registries
Additionally, the "cached ItemStack" registry, which contains references to most crafting or resource type items in the applicable mod, and is found in several of my mods - such as ItemStacks
in RotaryCraft and ChromaStacks
in ChromatiCraft, can be directly queried to save looking for - often long and complicated - registry names. For example, this block will define a basic 3x3 crafting recipe:
{
type = "test1"
recipe = {
shaped = true
input_top = "ore:stone, ore:stone, null"
input_middle = "minecraft:gold_ingot, chromaticraft_stack:elementUnit, null"
input_bottom = "ore:ingotGold, null, rotarycraft_stack:steelgear"
}
output = "chromaticraft_stack:lumaDust*3"
output_tag = {
tag1 = 370
tag2 = "potato"
}
}
That recipe will take a grid of:
[stone, stone, empty]
[gold ingot, CC elemental core, empty]
[gold ingot, empty, steel gear]
And make a stack of 3 CC luma dust, with NBT consisting of two tags, "tag1" mapped to int 370, and "tag2" mapped to string "potato".
Item Delegates
For ease of use, some complex items have special handlers you can use to define them. Notably, this includes Forestry genetics items - saplings, bees, et cetera - and mystcraft pages. To use this, you specify a "delegate" tag as the item ID, and provide a fake NBT block containing whatever values define the item you want.
For example, these three blocks define a forestry white willow sapling, a steadfast princess with some specific genes, and the "Single Biome" mystcraft page.
{
item = "delegate:forestry_tree"
nbt = {
class = "SAPLING"
species = "forestry.treeWillow"
}
}
{
item = "delegate:forestry_bee"
nbt = {
class = "PRINCESS"
species = "forestry.speciesSteadfast"
tolerant_flyer = true
speed = "forestry.speedSlower"
}
}
{
item = "delegate:myst_page"
nbt = {
page = "BioConSingle"
}
}
Do note that you will need to know their internal IDs/names in their respective registries (for example the allele UID for most forestry genes, seen in the "species" tags above), but this can usually be determined by reading the NBT of a known valid item.