-
Notifications
You must be signed in to change notification settings - Fork 1
[Version 4.0] Potion Effects
Insane96 edited this page Jan 24, 2023
·
2 revisions
You can add potion effects by using the object array potion_effects
.
-
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. Mostly used for events, if omitted will default to "infinite" duration -
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
-
- A potion effect
Potion effects with duration higher than 60 minutes on creepers will not generate a cloud on explosion
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"
]
}
}
]
}