
//Set the icon item
setIcon(<minecraft:stone_slab>)

//Set the title String
setTitle("The Slab King")

//Set the description String
setDescription("Craft a Stone Slab")

//Add a parent advancement. The syntax is "modid:folder/path/to/the/advancement/then/filename"
addParent("triumph:pack/pyrotech/straw")

//Set the position
setPos(-67,31)

//Adds criteria named "hasStoneSlab" with the trigger type "minecraft:inventory_changed". This function returns the criteria as an object
criteria = addCriteria("hasStoneSlab", "minecraft:inventory_changed")

//Adds the required item for the criteria. This is the item that needs to be in the player inventory.
criteria.addItem(<minecraft:stone_slab:0>)

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