//Set icon item
setIcon(<chancecubes:chance_cube>)

//Set title String
setTitle("Blocks with luck... Kinda...")

//Set description String
setDescription("Open one chancecube block.")

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

//Set the position
setPos(-1006,-254)

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

//Adds criteria named "brokeLog" with the trigger type "triumph:player_break_block". This function returns the criteria as an object
criteria = addCriteria("brokeLog", "triumph:player_break_block")

//Sets the required block for the criteria. This is the block that needs to be broken by the player.
criteria.setBlock(<chancecubes:chance_cube>)

//Adds a function to fire upon completion. Any number of these can be added.
addRewardFunction("triumph:happy_birthday")

//Sets the experience to reward upon completion. This can only be set once.
setRewardExperience(42)

//Adds an item to be rewarded upon completion. Only one of these can be set currently.
setRewardItem(<chancecubes:compact_giant_chance_cube>)