Skip to main content

Tribulation

A Tribulation defines a heavenly trial: the condition that triggers it, the phases it advances through, the difficulty multiplier, and the behaviour that runs on success or on failure.

File Location

Tribulation JSON files go in data/<namespace>/mxt/tribulation/ within your data pack.

The filename corresponds to its ID. For example, data/example/mxt/tribulation/three_thunders.json has the ID example:three_thunders.

Fields

FieldTypeDefaultDescription
trigger_conditionEntity Conditionmxt:always_trueThe trigger condition.
phasesList<Phase>requiredAt least one tribulation phase.
difficulty_scaleNumberProvider1The difficulty multiplier.
success_actionEntity Actionmxt:no_opThe success behaviour.
fail_actionEntity Actionmxt:no_opThe failure behaviour.

Phase

FieldTypeDefaultDescription
durationNumberProviderrequiredThe duration of the phase.
start_actionEntity Actionmxt:no_opThe behaviour executed when the phase starts.
end_actionEntity Actionmxt:no_opThe behaviour executed when the phase ends.

All lifecycle extensions use the matching Action field uniformly; there is no domain behaviour registry.

Example

{
"phases": [
{
"duration": 100,
"start_action": { "type": "mxt:apply_effect", "effect": "minecraft:resistance", "duration_ticks": 100 },
"end_action": { "type": "mxt:add_resource", "resource": "example:spirit_power", "amount": 2 }
},
{
"duration": 100,
"start_action": { "type": "mxt:apply_effect", "effect": "minecraft:glowing", "duration_ticks": 100 },
"end_action": { "type": "mxt:add_resource", "resource": "example:spirit_power", "amount": 2 }
},
{
"duration": 100,
"start_action": { "type": "mxt:apply_effect", "effect": "minecraft:strength", "duration_ticks": 100 },
"end_action": { "type": "mxt:add_resource", "resource": "example:spirit_power", "amount": 2 }
}
],
"difficulty_scale": "1 + level * 0.05",
"success_action": { "type": "mxt:add_resource", "resource": "example:true_essence", "amount": 10 },
"fail_action": { "type": "mxt:apply_effect", "effect": "minecraft:weakness", "duration_ticks": 200 }
}