Crafting Effects outcomes
Crafting effects outcomes determine what happens in a crafting effect. New outcomes can be registered by calling CraftingEffectRegistry.registerEffectType
in your mod constructor.
Crafting effect outcome
Crafting effect outcomes are used to make changes to the item as a player modifies a modular item.
Apply improvements crafting effect outcome
Applies the given improvements with the given levels to the target module, if the module is a major module and if the module is able to accept them.
Format:A list of improvements to apply to the target module, the key is the improvement key and the value is the level of the improvement.
{
"type": "tetra:apply_improvements",
"improvements": {
"blade/serrated": 1
}
}
Apply enchantment crafting effect outcome
Attempts to apply a list of enchantments onto the module in the target slot.
Format:A list of enchantments to apply to the target module, the key is the enchantment id and the value is the level of the enchantment.
If true, the enchantments will be applied even if the target module doesn't have the aspects required by the enchantments.
Determines how the enchantments should be applied if the target module already has enchantments. 'add' will add the given level for conflicting enchantments, 'max' will use the highest level for conflicting enchantments, 'stack' works like 'max' but increments the level by 1 if the given and current levels are equal, 'replace' will override the level of conflicting enchantments with the given level.
{
"type": "tetra:apply_enchantment",
"enchantments": {
"minecraft:sharpness": 1
}
}
Apply list crafting effect outcome
Applies a list of crafting effect outcomes. By combining the 'random', 'count' and 'requirement' fields you can use this to apply a random effect, or to apply the first effect in a set depending on some requirements.
Format:When set this outcome will apply a maximum of this many outcomes. If not set all outcomes will be applied.
When set to true the outcomes will be applied in a random order.
{
"type": "tetra:apply_list",
"effects": [
{
"outcome": {
"type": "tetra:apply_improvement",
"improvements": {
"durable": 1
}
}
},
{
"outcome": {
"type": "tetra:apply_improvement",
"improvements": {
"brittle": 1
}
}
}
],
"count": 1,
"random": true
}
Remove improvement crafting effect outcome
Removes improvements matching the specified keys from the target module.
Format:All improvements matching any of these keys will be removed from the module.
{
"type": "tetra:remove_improvements",
"improvements": [
"unbound_stonecutter/fractured"
]
}
Material reduction crafting effect outcome
Has a chance to reduce the material cost for the craft by 1.
Format:The probability that the material cost will be reduced. A value of 1 will always reduce the material cost, while a value of 0 will never reduce the material cost.
{
"type": "tetra:material_reduction",
"probability": 0.5
}