
//Set icon item
setIcon(<aether_legacy:incubator>)

//Set title String
setTitle("Hatching Eggs")

//Set description String
setDescription("Incubators are used to hatch certain eggs found in the Aether. They use ambrosium torches as fuel. Note that this creature will immediatley spawn when the egg finishes in the Incubator.")

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

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

//Adds the required item for the criteria. This is the item that needs to be in the player inventory.
criteria.addItem(<aether_legacy:incubator>)

drawDirectLines(true)

//Set the position
setPos(-240,87)

//Rewards
setRewardExperience(4)