Advancements
Advancements in Kore can be created using the advancement
function. This documentation will show you how to create and customize advancements.
Basic Usage
To create a basic advancement:
Parent Advancements
You can specify a parent advancement for your advancement. This is done by setting the parent
property to an Advancement
object or an AdvancementArgument
object. Here's an example:
Display
The display block allows you to customize how the advancement appears in-game:
icon
: The icon of the advancement, defined by anAdvancementIcon
object which is an item + nbt data.title
: The title of the advancement, defined by aChatComponents
object.description
: The description of the advancement, defined by aChatComponents
object.frame
: The frame type of the advancement, which can beCHALLENGE
,GOAL
, orTASK
, defaults toTASK
.background
: The background texture of the advancement, specified as a string (optional).showToast
: Whether to show a toast notification when the advancement is achieved (optional).announceToChat
: Whether to announce the advancement in chat when it is achieved (optional).hidden
: Whether the advancement is hidden until it is achieved (optional).
Criteria
Criteria define the conditions that must be met to earn the advancement.
Each criterion can have predicate conditions that must be met for the criterion to be completed on top of its properties.
For a complete guide on predicates and their conditions, see the Predicates documentation.
You can add multiple criteria:
Available Triggers
Check the Triggers page for a list of available triggers.
Requirements
Requirements define which criteria must be completed to earn the advancement:
Rewards
You can define rewards for completing the advancement:
experience
: The amount of experience to give the player.function
: A function to run when the advancement is completed.loots
: A list of loot tables to give the player.recipes
: A list of recipes to unlock for the player.
Telemetry
You can enable or disable telemetry for the advancement, defaults to false
:
Complete Example
Here's a complete example combining various features: