Crafting requirements
Crafting requirements are used by schematics to determine if the schematic is applicable in a given context, based on the target itemstack, player and the world.
And crafting requirement
Passes if ALL of the given requirements pass.
Format:{
"type": "tetra:and",
"requirements": [
{
"type": "tetra:never"
},
{
"type": "tetra:never"
}
]
}
Or crafting requirement
Passes if ANY of the given requirements pass.
Format:{
"type": "tetra:or",
"requirements": [
{
"type": "tetra:never"
},
{
"type": "tetra:never"
}
]
}
Accepts improvement crafting requirement
Passes if the module in the target slot accepts the given improvement, optionally at the given level. todo: change the level field to use an integer predicate (breaking change).
Format:Passes if the module in the target slot accepts an improvement with a key matching this value. Accepts as in the module references an improvements resource which define an improvement with the key.
In addition to accepting the improvement it also has to be accepted specifically at this level.
{
"type": "tetra:accepts_improvement",
"improvement": "blade/serrated",
"level": 5
}
Aspect crafting requirement
Passes if the module (including its improvements) in the target slot has the given aspect, optionally matching the given level predicate.
Format:{
"type": "tetra:aspect",
"aspect": "edged_weapon",
"level": {
"min": 2
}
}
Feature flag crafting requirement
Passes if the given feature flag is enabled. Internal use, please chill.
Format:This feature flag has to be enabled.
Locked crafting requirement
Passes if some nearby block provides a schematic key matching the given schematic key, the providing block typically determines under which conditions it wants to provide its schematic(s).
Format:Module crafting requirement
Passes if the module in the target slot matches the given parameters. When it makes sense to use, using aspects instead of relying on this requirement would make for better compat between addons. Omitting all fields would make this requirement pass if a module is present in the target slot, but fail if it's empty.
Format:The key of the module has to match this if present.
The key of the module variant has to match this if present.
When present, attempts to extract a material string from the variant key to be matched against this value.
{
"type": "tetra:module",
"module": "double/adze_right"
}
Slot crafting requirement
Passes if the target slot matches the given slot.
Format:The target slot has to match this slot.
{
"type": "tetra:slot",
"slot": "sword/blade"
}
Never crafting requirement
Never passes, no surprises.
Format: