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

//Set title String
setTitle("A Different kind of Dragon Egg")

//Set description String
setDescription("")

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

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

drawDirectLines(true)

//Set the position
setPos(57,148)

//Rewards
setRewardExperience(4)