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. Keys prefixed with '#' are treated as aspect identifiers — a random improvement with that aspect (that's available for the target module) will be selected.
Determines how the improvement level interacts with an existing improvement level on the module. 'add' sums the levels, 'stack' always adds the new level on top of the current (treating negative current as 0), 'stackTo' only stacks if the new level is higher than the current, 'stackFrom' only stacks if the new level is lower than the current, 'max' keeps the higher of the two levels, 'replace' always sets the new level regardless of the current value.
{
"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_enchantments",
"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. Either the 'effects' or the 'references' fields must be set or this effect will not do anything.
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.
When a multi-item material cost is reduced, each successive reduction multiplies the probability by this value, making further reductions less likely. Set to 1 to disable diminishing returns, set to 0 to allow at most one reduction per craft.
{
"type": "tetra:material_reduction",
"probability": 0.5
}Per-slot crafting effect outcome
Applies an outcome once for each module slot on the item, optionally filtering which slots are targeted.
Format:If set, only slots listed here will be targeted. If omitted, all slots are eligible.
Slots listed here will be skipped even if they would otherwise be targeted.
If false, the slot currently being crafted is excluded from the iteration.
If true, major module slots are included.
If true, minor module slots are included.
{
"type": "tetra:per_slot",
"outcome": {
"type": "tetra:apply_improvements",
"improvements": {
"some/improvement": 1
}
},
"major": true,
"minor": false
}Destabilize crafting effect outcome
NOTE: To add destabilization effects to the regular flow, drop crafting effects with "active": false in "crafting_effects/destabilization/" instead of using this outcome. Applies one or more outcomes based on the destabilization chance of the module in the target slot. Each time destabilization triggers, a random outcome from the list is applied. Can trigger multiple times if the destabilization chance exceeds 1.
Format:{
"type": "tetra:destabilize",
"outcomes": [
{
"type": "tetra:apply_improvements",
"improvements": {
"destabilized": 1
}
}
]
}Explosion crafting effect outcome
Creates an explosion at or near the workbench when the craft completes.
Format:The radius of the explosion.
The probability that the explosion occurs. A value of 1 always triggers, a value of 0 never triggers.
If greater than 0, the explosion origin is offset by a random amount in each axis up to this distance from the workbench.
{
"type": "tetra:explosion",
"radius": 4,
"chance": 0.5
}Lightning strike crafting effect outcome
Summons a lightning bolt at or near the workbench when the craft completes, optionally after a delay with particle effects.
Format:The probability that the lightning strike occurs. A value of 1 always triggers, a value of 0 never triggers.
Number of ticks to wait before the lightning bolt spawns. Electric spark particles are shown during the delay. Set to 0 for an instant strike.
If greater than 0, the lightning target is offset by a random horizontal distance up to this value from the workbench.
{
"type": "tetra:lightning_strike",
"chance": 0.75,
"delayTicks": 40
}Spawn effect cloud crafting effect outcome
Spawns an area effect cloud with a mob effect at or near the workbench when the craft completes.
Format:The amplifier of the mob effect (0 = level I).
Duration of the mob effect in ticks when applied to an entity.
How long the effect cloud entity persists, in ticks.
Ticks before the cloud begins applying effects to nearby entities.
The initial radius of the effect cloud.
Amount by which the cloud radius changes per tick. Negative values shrink the cloud over time.
The probability that the cloud spawns. A value of 1 always triggers, a value of 0 never triggers.
If greater than 0, the cloud spawn position is offset by a random horizontal distance up to this value from the workbench.
{
"type": "tetra:spawn_effect_cloud",
"effect": "minecraft:poison",
"amplifier": 1,
"duration": 200,
"radius": 3
}Spawn entity crafting effect outcome
Spawns an entity at or near the workbench when the craft completes. The entity is defined by an NBT compound tag as used by the /summon command.
Format:The probability that the entity spawns. A value of 1 always triggers, a value of 0 never triggers.
If greater than 0, the spawn position is offset by a random horizontal distance up to this value and up to 2 blocks vertically from the workbench.
If set, particles are spawned around the entity after it appears.
{
"type": "tetra:spawn_entity",
"entity": {
"id": "minecraft:vex"
},
"chance": 1
}Spawn sculk crafting effect outcome
Spreads sculk growth from a surface adjacent to the workbench or a nearby sculk catalyst.
Format:Controls how aggressively the sculk spreads.
The probability that sculk spreads. A value of 1 always triggers, a value of 0 never triggers.
If true, sculk will try to spread from a sculk catalyst within 2 blocks of the workbench.
If true, sculk will try to spread from a surface adjacent to the workbench.
{
"type": "tetra:spawn_sculk",
"severity": 5,
"workbenchSource": true
}Set blocks crafting effect outcome
Replaces blocks in a radius around the workbench with a specified block state when the craft completes.
Format:The block state to place, as a resource location. Block properties are not currently supported.
If true, only blocks that are replaceable (e.g. air, grass, snow layers) can be replaced.
If true, only positions with a solid block directly below are eligible.
If true, only positions with at least one solid block on any face are eligible (useful for placing face-attached blocks like sculk vein).
If true, the workbench position itself is excluded.
Manhattan distance radius around the workbench to search for eligible positions.
Maximum number of blocks to replace per craft.
The probability that any blocks are replaced at all.
Particle to spawn when a block is placed.
Ticks to wait before placing each block.
Additional random ticks added to the delay (uniform between 0 and this value).
Tick interval between interval particles/sounds played during the delay.
Particle to spawn repeatedly during the delay at the target position.
Volume change applied to the interval sound on each interval tick.
Pitch change applied to the interval sound on each interval tick.
{
"type": "tetra:set_blocks",
"blockState": "minecraft:sculk_vein",
"radius": 5,
"count": 3,
"solidAdjacent": true
}