//Set icon item
setIcon(<magneticraft:chunks, meta:2>)

//Set title String
setTitle("Chunks *Copper*")

//Set description String
setDescription("Chunks are what you get from running Rocky Chunks thru a Sluice Box.")

//Add a parent advancement. The syntax is "modid:folder/path/to/the/advancement/then/filename"

addParent("triumph:magneticraft/sluicebox")
setRequiresParent(true)

//Set the position
setPos(5, 1)

//Set this to use direct lines, so I can have a pretty shape
drawDirectLines(true)

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

//Adds the required item for the criteria. This is the item that needs to be in the player inventory.
criteria.addItem(<magneticraft:chunks, meta:2>)