//Set icon item
setIcon("betterwithmods:material", 7)

//Set title String
setTitle("Grind that Leather!")

//Set description String
setDescription("The Frist step to processing LEATHER requires you to SCOUR the LEATHER in the MILLSTONE!")

//Set the parent advancement. The syntax is "modid:folder/path/to/the/advancement/then/filename"
setParent("triumph:betterwithmods/millstone")

//Adds criteria named "hasCauldron" with the trigger type "minecraft:inventory_changed". This function returns the criteria as an object
criteria = addCriteria("hasScouredLeather", "minecraft:inventory_changed")
//Adds the required item for the criteria. This is the item that needs to be in the player inventory. First variable is the item name, second is the metadata and is not required.
criteria.addItem("betterwithmods:material", 7)

//Sets the experience reward for the advancement.
setRewardExperience(10)

//By not setting anything about requirements here, all criteria are automatically required