Skip to main content

Grant Advancement

Grant Advancement

Awards a [AdvancementDefinitionEntry] to the player, or takes it back. The generated advancements are granted by nothing but this action: their only criterion is minecraft:impossible, so the player earns them exactly when a page says so.

Fields

FieldTypeDefaultDescription
advancementRef<AdvancementDefinitionEntry>—Advancement to award.
revokeBooleanfalseTake the advancement back instead of awarding it.
includeParentsBooleantrueAlso award every advancement above this one, so the tree can never show a child earned under an unearned parent.
Common TypeWriter fields (criteria, modifiers, triggers)
FieldTypeDefaultDescription
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

Awards the advancement to the player, or takes it back with revoke. With includeParents, every advancement above it is awarded first, so the tree never shows a child earned under an unearned parent. The console warns when the advancement is unknown to the server, which means it was added after the last start.