-
Notifications
You must be signed in to change notification settings - Fork 1
[Version 4.0] Advancements
Insane96 edited this page Jan 24, 2023
·
1 revision
Advancements can be used as a condition for mobs properties.
-
advancements_done
: An array of advancement objects- An advancement object
-
advancements
: a list of advancements to be completed. -
player_mode
: Which player should be targeted to check if the advancements are done?- "nearest": When a mob spawns the advancements are checked only for the nearest player
- "any": When a mob spawns the advancements are checked for any player in a 128 blocks radius
-
- An advancement object
Advancement Objects in advancements_done
work as an OR condition, only one of the advancement objects must be fulfilled.
Advancments in advancements
instead work as an AND condition. All the advancements in the list must be fulfilled.
This example makes Skeletons get Resistance II when the player has defeated the Ender Dragon.
{
"mob_id": "minecraft:skeleton",
"potion_effects": [
{
"id": "minecraft:resistance",
"amplifier": 1,
"ambient": true
}
],
"conditions": {
"advancements_done": [
{
"advancements": [ "minecraft:end/kill_dragon" ],
"player_mode": "any"
}
]
}
}
This example makes Skeletons get Resistance II when the player has either defeated the Ender Dragon OR summoned the Wither.
{
"mob_id": "minecraft:skeleton",
"potion_effects": [
{
"id": "minecraft:resistance",
"amplifier": 1,
"ambient": true
}
],
"conditions": {
"advancements_done": [
{
"advancements": [ "minecraft:end/kill_dragon" ],
"player_mode": "any"
},
{
"advancements": [ "minecraft:nether/summon_wither" ],
"player_mode": "any"
}
]
}
}
This example makes Skeletons get Resistance II when the player has defeated the Ender Dragon AND summoned the Wither.
{
"mob_id": "minecraft:skeleton",
"potion_effects": [
{
"id": "minecraft:resistance",
"amplifier": 1,
"ambient": true
}
],
"conditions": {
"advancements_done": [
{
"advancements": [ "minecraft:end/kill_dragon", "minecraft:nether/summon_wither" ],
"player_mode": "any"
}
]
}
}