Creating Assembler Recipes
In this article we will look into how to make recipes for the Assembler using json based datapacks. The folder location for your recipes would be in data/NAMESPACE_HERE/envirocore/assembler/
the NAMESPACE_HERE can be replaced with your datapack/mods id.
Lets make a recipe.
This is the base recipe structure for an Assembler recipe. "top"
, "bottom"
, "left"
, "right"
and "center"
are all input slots and "output"
is obviously the output slot for the recipe. The "duration"
is how long the recipe takes to craft in ticks. Keep in mind that this is the base recipe time and can be faster if Frequency Modifiers are used inside the Assemblers modifier slots.
{
"duration": {
"raw:int": 100
},
"top": {
},
"bottom": {
},
"left": {
},
"right": {
},
"center": {
},
"output": {
}
}
Each input can accept a variety of types including Items, Items with NBT, and Item Tags.
Item
For regular items it will look something like this:
"raw:item": "minecraft:iron_ingot"
Item Tags
This would be the same syntax for both input slots and output slots.
"raw:item_tag": "forge:ingots/iron"
- all: All items that are in the tag.
- all_whitelisted: All items from the provided namespaces in the given tag.
- all_with_blacklist: All items from the tag as long as they don't belong to the blacklisted namespaces.
- first: First item value from the tag.
- first_whitelisted: First item from the tag that matches one of the provided namespaces.
- first_preferred: First tries to match an item from the provided namespaces but will take the first item in the tag if none match.
- first_with_blacklist: First item that does not match any of the blacklisted namespaces.
The following is an example of how to use these selectors with and item_tag:
{
"raw:item_tag": "minecraft:flowers",
"selector": {
"type": "all_with_blacklist",
"values": ["botania"]
}
}
Item with NBT
You only need the "match_nbt": true
if you are using this in an input slot. For output slots, the provided nbt will be added to the item regardless.
"raw:item": "envirocore:fe_input", "nbt": "{tier:2,energy:{capacity:8192}}", "match_nbt": true
In assembler recipes the "center"
slot can have its nbt merged with the output Item. To do that you will need to have the following in the base recipe itself(not in any of the slots)
"merge_center_nbt": true