Skip to content

Action On Gain Level

Provismet edited this page Jul 1, 2023 · 1 revision

Power Type

Performs an action every time the player gains an experience level.

Type ID: proviorigins:action_on_gain_level

Note
In standard vanilla Minecraft only one level is gained at a time. If a player gains 30 levels worth of experience at once, then that is counted as 30 separate instances of gaining a level. The experience command is the only vanilla method of gaining multiple levels in a single instance.
Losing levels (such as from anvils) counts as a "gain" with a negative value.

Fields

Field Type Default Description
entity_action Entity Action Type The action to execute from this entity.
comparison Comparison ">=" How the amount of levels gained (in a single instance) should be compared.
compare_to Integer 1 The value to compare to.

Examples

{
    "type": "proviorigins:action_on_gain_level",
    "entity_action": {
        "type": "origins:damage",
        "amount": 1,
        "damage_type": "minecraft:magic"
    }
}

This example makes the player take 0.5 hearts of damage every time they gain a level.

Clone this wiki locally