//Set icon item
setIcon(<tconstruct:materials, meta:19>)

//Set title String
setTitle("Mending Moss")

//Set description String
setDescription("The Ball of moss when right clicked on a bookshelf with 10 levels of xp will turn it into Mending Moss which is what you need to apply to your tinker tool or weapon to add mending.")

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

addParent("triumph:tinkers/toolstation")
addParent("triumph:tinkers/ballofmoss")
setRequiresParent(true)

//Set the position
setPos(12, 13)

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

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

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