Skip to content

[Version 4.10] Condition Modifier

Alberto Del Villano edited this page Aug 27, 2024 · 4 revisions

Condition Modifier (Inherits from Modifier)

Example

With this example, Creepers get Speed I on spawn, if the Ender Dragon has been defeated, they get Speed II.

{
    "target": "minecraft:creeper",
    "potion_effects": [
        {
            "id": "minecraft:speed",
            "amplifier": {
                "value": 0,
                "condition_modifiers": [
                    {
                        "operation": "add",
                        "condition": {
                            "advancements_unlocked": [
                                {
                                    "advancements": [ "minecraft:end/kill_dragon" ],
                                    "player_mode": "any"
                                }
                            ]
                        },
                        "amount": 1
                    }
                ]
            }
        }
    ]
}
Clone this wiki locally