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

//Set the title String
setTitle("On the Naughty List")

//Set the description String
setDescription("Use a Pit Burn to collect Charcoal")

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

//Set the position
setPos(24,16)

//Hide the connection lines, so I can have a pretty shape
hideLines(false)

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

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