Sandstone features fully-typed advancements. Like for all resources, you need to provide a name, which can include a namespace and folders. You then provide the definition of the advancement.
The minimal syntax for advancements is the following:
As you can see, you must provide at least 1 criteria. It must have a name, and a trigger. The trigger is autocompleted from a list of all possible triggers. Once you specified a
conditions object will tell you what properties are possible.
All additional properties can be directly found via autocompletion (as shown above), or by looking at the Minecraft wiki article on Advancements.
Sandstone Advancements have several methods mimicking the
You can also check for a specific advancement in selectors. Let's say you have an advancement named
breedCowsAdvancement, granted to players who bred cows. You can select players who have this advancement with the following syntax:
You can also check for specific criterias. Let's create a new advancement to check if the player bred cows & chicken:
There are 2 criterias:
bred_chicken. Knowing this, you can check for a player who bred cows but did not bred chickens:
requirements property only accepts actual criteria names. This is to ensure the datapack will actually run in Minecraft. However, the autocompletion does not work on them, even though the criteria names could be infered. This is due to a Typescript bug: if it is annoying to you, please vote on this issue.