
//Set icon item
setIcon(<ancientwarfareautomation:hand_cranked_generator>)

//Set title String
setTitle("Torquing for Power")

//Set description String
setDescription("A Hand Cranked Torque Generator is a generator that creates power by being right clicked by a player. It can also be worked by a craftman worker (A worker given a hammer).")

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

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

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

drawDirectLines(true)

//Set the position
setPos(48,37)

//Rewards
setRewardExperience(4)