I have the following JSON
{
"display": {
"icon": {
"item": "minecraft:elytra"
},
"title": "Learn to Fly"
},
"parent": "minecraft:story/enter_end_gateway",
"criteria": {
"elytra": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:elytra",
"data": 1
}
]
}
}
}
}
How would I be able to create this within Java?
Along with being able to get each element, eg the title.
Thanks!