//Set icon item
setIcon("minecraft:wooden_axe")

//Set title String
setTitle("Craft the Axe!")

//Set description String
setDescription("Use an Axe to get logs from trees, also if you craft a log with an axe you will get SAWDUST, PLANKS, and BARK.")

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

//Adds criteria named "hasWoodAxe" with the trigger type "minecraft:inventory_changed". This function returns the criteria as an object
criteria = addCriteria("hasWoodAxe", "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("minecraft:wooden_axe")

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

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