Skip to main content

Curse

A curse defines a referenceable curse: how long it lasts, how it stacks, and which behaviour runs when it is applied, ticks and is removed.

File Location

Curse files go in data/<namespace>/mxt/curse/ within your datapack.

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

Fields

FieldTypeDefaultDescription
typeCurseTyperequiredmxt:timed, mxt:permanent, mxt:triggered or mxt:empty.
duration_ticksNumberProvider0Duration of a timed curse; the unit is ticks.
tick_intervalNumberProvider20Interval of the periodic behaviour.
max_stacksInteger1Maximum number of stacks, range 1..256.
stacking_modeEnumignoreignore, refresh_duration, add_stacks_refresh_duration, add_stacks_keep_duration or replace.
application_conditionEntityConditionmxt:always_trueWhether the curse may be applied.
on_applyEntityActionmxt:no_opBehaviour on the first application.
on_tickEntityActionmxt:no_opPeriodic behaviour.
on_removeEntityActionmxt:no_opBehaviour on removal.
cleanse_tagsIdentifier[][]Tags that may be cleansed.
allow_force_removeBooleanfalseWhether force removal is allowed.

Example

{
"type": "mxt:timed",
"duration_ticks": 600,
"tick_interval": 20,
"max_stacks": 3,
"stacking_mode": "add_stacks_refresh_duration",
"application_condition": {"type": "mxt:always_true"},
"on_apply": {"type": "mxt:no_op"},
"on_tick": {"type": "mxt:damage", "amount": 1},
"on_remove": {"type": "mxt:no_op"},
"cleanse_tags": ["example:burning"],
"allow_force_remove": false
}