//Set icon item
setIcon("minecraft:bed", 14)

//Set title String
setTitle("A good nights sleep!")

//Set description String
setDescription("Craft a bed and sleep in it to set your spawnpoint!")

//Set the parent advancement. The syntax is "modid:folder/path/to/the/advancement/then/filename"
setParent("triumph:betterwithmods/root")

addCriteria("slept_in_bed", "minecraft:slept_in_bed")

//Sets the experience reward for the advancement.
setRewardExperience(10)

//By not setting anything about requirements here, all criteria are automatically required