//Set the toast notification in the top right corner of the screen to not show up when this advancement is achieved.
setShowToast(true)

//Set the advancement to not send a chat message when it is achieved.
setAnnounceToChat(true)

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

//Set the title String
setTitle("Melon Golem")

//Set the description String
setDescription("Accrue the blocks needed to create the coveted Watermelon Golem. (Golem Head instead of Pumpkin)")

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


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

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

//Sets the item for the criteria. This is the item that needs to be crafted.
melonCriteria.addItem(<minecraft:melon_block>)
melonCriteria.setCount(4)

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

//Sets the item for the criteria. This is the item that needs to be crafted.
pumpkinCriteria.addItem(<golems:golem_head>)

//By not setting anything about requirements here, all criteria are automatically required
setPos(-358,201)