#Replacing ingredients of specific recipe
32 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
i can get it to work by doing this
event.remove({ id: 'sophisticatedbackpacks:backpack' })
event.custom(
{
"type": "sophisticatedbackpacks:basic_backpack",
"conditions": [
{
"itemRegistryName": "sophisticatedbackpacks:backpack",
"type": "sophisticatedcore:item_enabled"
}
],
"pattern": [
"RLR",
"RCR",
"LLL"
],
"key": {
"L": {
"tag": "forge:leather"
},
"C": {
"tag": "forge:chests/wooden"
},
"R": {
"item": "supplementaries:rope"
},
},
"result": {
"item": "sophisticatedbackpacks:backpack"
}
})
})```
but would very much like to know why my first block of code doesn't work as it seems much cleaner
same reason you had trouble with it last time
custom recipe type, KJS doesn't know the mappings
you might be able to fetch the recipe using the recipe event object, somehow, and then modify it from there
not sure how to do that though
oh okay
"ABA",
"ACA",
"DDD"
],
{
A: "supplementaries:rope",
B: "supplementaries:sack",
C: "#forge:chests/wooden",
D: "minecraft:leather",
})
.id('sophisticatedbackpacks:backpack')```
I just took this from a modpack, seems to work and fully replace the original as well
is there any way to make this middle ingredient have multiple options to use? or is the only way creating a new recipe for each option
tried this and it didnt work
is there a #forge:sack or something
😭
there can be if you make it yourself
you need to make it a list, you cant just type randomly 😛
and a list
🧐
send me the code 😛
the .js file itself?
code is here
or just the recipe itself
basically supplementaries squared adds a bunch of color variants to sacks and i just want to be able to use them in the recipe
was missing the other bits, but i'll add them self
event.shaped("sophisticatedbackpacks:backpack", [
"ABA",
"ACA",
"DDD"
], {
A: "supplementaries:rope",
B: ["supplementaries:sack", "suppsquared:sack_pink"],
C: "#forge:chests/wooden",
D: "minecraft:leather",
}).id('sophisticatedbackpacks:backpack')
OR
if you want to use tags
ServerEvents.tags('item', event => {
event.add('forge:sack', ['supplementaries:sack', 'suppsquared:sack_pink']
})
and
event.shaped("sophisticatedbackpacks:backpack", [
"ABA",
"ACA",
"DDD"
], {
A: "supplementaries:rope",
B: "#forge:sack",
C: "#forge:chests/wooden",
D: "minecraft:leather",
}).id('sophisticatedbackpacks:backpack')
oh cool ill make a tag for it thank you!
can i use that created tag in other .js files too then?
yes ofc
^^