#Sophisticated backpacks upgrade recipe
15 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
You can add, remove, and modify recipes with KubeJS. The wiki has a page on that!
If you want to learn how to add recipes to any mod, click the Custom button.
thank you so much, it works now. I will paste code here so others will know how to do that.
ServerEvents.recipes(event =>{
event.custom({
"type": "sophisticatedbackpacks:backpack_upgrade",
"category": "misc",
"key": {
"B": {
"item": "sophisticatedbackpacks:backpack"
},
"I": {
"item": "minecraft:iron_block"
},
"G": {
"item": "minecraft:iron_ingot"
}
},
"pattern": [
"IGI",
"GBG",
"IGI"
],
"result": {
"count": 1,
"id": "sophisticatedbackpacks:iron_backpack"
}
})
})
Can i give to that recipe a custom id?
yes sure
event.custom({}).id("custom_id_here")
for example:
ServerEvents.recipes(event =>{
event.custom({
"type": "sophisticatedbackpacks:backpack_upgrade",
"category": "misc",
"key": {
"B": {
"item": "sophisticatedbackpacks:backpack"
},
"I": {
"item": "minecraft:iron_block"
},
"G": {
"item": "minecraft:iron_ingot"
}
},
"pattern": [
"IGI",
"GBG",
"IGI"
],
"result": {
"count": 1,
"id": "sophisticatedbackpacks:iron_backpack"
}
}).id("custom_iron_backpack_upgrade")
})
Thanks a lot
Ticket closed!
I spent like 3 hours trying to make it work