Skip to content

[1.16+] Potion Effects

Alberto edited this page Jul 15, 2022 · 6 revisions

You can add potion effects by using the object array potion_effects.

Potion Effect

  • potion_effects: An array of potion effects
    • A potion effect
      • id: id of the potion effect. This is mandatory.
      • amplifier: Range Object representing the min and max possible levels that the potion effect can have. Remember that levels start from 0, so amplifier 0 is potion effect level I, amplifier 1 = potion level II, etc. If omitted the effect will be level I
      • chance: Modifiable Value Object rapresenting the percentage chance (between 0 and 1) to apply the effect. If omitted the effect will always be applied.
      • duration: Range Object representing the duration (in seconds) of the potion effect
      • ambient: If true particles will be like the ones from Beacons, barely visible.
      • hide_particles: If true particles will be hidden.
      • world_whitelist: World Whitelist Object

Notes

Potion effects on creepers will not generate a cloud on explosion

Examples

This example will make creepers have 15% chance to get Resistance I on spawn. (amplifier is omitted and defaults to I)

{
    "mob_id": "minecraft:creeper",
    "potion_effects": [
        {
            "id": "minecraft:resistance",
            "chance": 0.15
        }
    ]
}

This example on endermen has:

  • 15% chance to give Regeneration I to II, while particles are translucent (like the ones from Beacon effects).
  • 15% chance to give them Resistance I with hidden particles.
  • 7.5%/15%/30% (in Easy/Normal/Hard) chance to get Speed I.
  • 30% chance to get Fire Resistance if the enderman spawns in the Nether.
{
    "mob_id": "minecraft:enderman",
    "potion_effects": [
        {
            "id": "minecraft:regeneration",
            "chance": 0.15,
            "amplifier": {
                "min": 0,
                "max": 1
            },
            "ambient": true
        },
        {
            "id": "minecraft:resistance",
            "chance": 0.15,
            "hide_particles": true
        },
        {
            "id": "minecraft:speed",
            "chance": {
                "value": 0.15,
                "difficulty_modifier": {
                    "operation": "add",
                    "easy": -0.075,
                    "normal": 0,
                    "hard": 0.15
                }
            }
        },
        {
            "id": "minecraft:fire_resistance",
            "chance": 0.3,
            "amplifier": 0,
            "world_whitelist": {
                "dimensions": [
                    "minecraft:the_nether"
                ]
            }
        }
    ]
}
Clone this wiki locally