
//Set icon item
setIcon(<minecraft:spawn_egg, nbt:{EntityTag: {id: "primitivemobs:traveling_merchant"}}>)

//Set title String
setTitle("Having Trouble finding a Wandering Trader?")

//Set description String
setDescription("Though its more expensive, you can craft a spawn egg of a Wandering Trader to get the elusive blaze powder. Right clicking them with an Emerald Block will ensure they do not despawn, as they normally will some minutes after being spawned.")

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

//Adds criteria named "hasFlint" with the trigger type "minecraft:inventory_changed". This function returns the criteria as an object
criteria = addCriteria("hasWanderingVillagerEgg", "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:spawn_egg, nbt:{EntityTag: {id: "primitivemobs:traveling_merchant"}}>)

drawDirectLines(true)

//Set the position
setPos(-364,78)

//Rewards
setRewardExperience(4)