Skip to content

Grant Advancement

Entity Action Type

Grants an advancement or a criterion/criteria of an advancement to the player.

Type ID: eggolib:grant_advancement

Fields

Field Type Default Description
advancement Identifier optional The advancement to grant to the player.
criterion String optional If specified, this criterion will be granted to the player.
criteria Array of Strings optional If specified, these criteria will be granted to the player.
selection Advancement Selection "only" Determines how the parent(s) and child(ren) of the specified advancement is granted.

Examples

"entity_action": {
    "type": "eggolib:grant_advancement",
    "selection": "everything"
}

This example will grant all the advancements to the player.

"entity_action": {
    "type": "eggolib:grant_advancement",
    "advancement": "minecraft:story/obtain_armor"
}

This example will grant the "Suit Up" (data/minecraft/advancements/story/obtain_armor.json) advancement to the player.

"entity_action": {
    "type": "eggolib:grant_advancement",
    "advancement": "minecraft:adventure/kill_all_mobs",
    "criteria": [
        "minecraft:blaze",
        "minecraft:enderman",
        "minecraft:zombie"
    ]
}

This example will grant the "Monsters Hunted" (data/minecraft/advancements/adventure/kill_all_mobs.json) advancement partially, with only the minecraft:blaze, minecraft:enderman, and minecraft:zombie criteria fulfilled.