//Set icon item
setIcon(<minecraft:planks>)

//Set title String
setTitle("Meet Plank")

//Set description String
setDescription("Get planks by crafting logs with and axe or by punching a tree !NOTE! Trees drop planks, sawdust and bark when punched")

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

//Set the position
setPos(12, 10)

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

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