User:PepijnMC/sandbox/Tutorials/Creating an advancement

To make an advancement, first go to the "minecraft" folder. On Windows, it will be called ".minecraft" inside the "AppData" folder and to get there go to your start menu and type in "%appdata%". On a Mac, it is called "minecraft" and you can find it by going to Finder, pressing Shift-Command-G and typing "~/Library/Application Support/minecraft". Under Linux it is called ".minecraft" and is in your home directory (hidden by default).

Once you're inside the "minecraft" folder, go to the "saves" folder and from there pick the world for which you want to create an advancement. Go to the "data" folder of the world and open the "advancements" folder. In this "advancements" folder, create a new folder with any name you want. This folder will be the namespace of your advancement.

Advancements in Minecraft are written using JSON files. You can use any text editor to create a JSON file in your namespace, just make sure to save it as.

JSON format
An advancement JSON file is structured according to the following format:


 * The root tag.
 * : The optional display data.
 * : The data for the icon.
 * : The item id.
 * : The damage value for the item.
 * : The title for this advancement.
 * : A JSON text component (containing text and formatting like used in /tellraw and various other commands. Also translate tag can be used here).
 * : The optional type of frame for the icon.  for a tile with a more fancy spiked border,   for a tile with a rounded border,   for a normal tile (default.)
 * : The optional directory for the background to use in this advancement tab (only for the root advancement).
 * : The description of the advancement.
 * : A JSON text component (containing text and formatting like used in /tellraw and various other commands. Also translate tag can be used here).
 * : Can be  or  . Whether or not to show the toast pop up after completing this advancement. Defaults to true.
 * : Can be  or  . Whether or not to announce in the chat when this advancement has been completed. Defaults to true.
 * : Can be  or  . Whether or not to hide this advancement and all its children from the advancement screen until this advancement have been completed. Has no effect on root advancements them self but will still affect all their children. Defaults to false.
 * : The optional parent advancement directory of this advancement (does not apply for the root advancement).
 * : The required criteria that have to be met.
 * : A name given to the criteria (can be any string, must be unique).
 * : The trigger for this advancement; specifies what the game should check for the advancement.
 * : All the conditions that need to be met when the trigger gets activated.
 * : An optional list of requirements (all the  ). If all criteria are required, this may be omitted. With multiple criteria: requirements contains a list of lists with criteria (all criteria need to be mentioned). If all of the lists each have any criteria met, it will complete the advancement. (basically AND grouping of OR groups)
 * : An optional collection of the rewards provided when this advancement is obtained.
 * : A list of crafting recipes (strings).
 * : A list of loot tables (strings).
 * : An amount of experience.
 * : A function to run.

Criteria
Criteria are used to specify when an advancement is completed by a player, making them necessary for every advancement