#Replacing ingredients of specific recipe

32 messages · Page 1 of 1 (latest)

terse canopy
#

Trying to replace the string in a backpack recipe with rope, but in game it's not working, not getting any errors either.

    event.replaceInput(
        { output: 'sophisticatedbackpacks:backpack' },
        'forge:string',
        'forge:rope'
      )
  })```
glass mothBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

terse canopy
#

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
solid latch
#

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

terse canopy
#

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
terse canopy
#

tried this and it didnt work

#

is there a #forge:sack or something

#

😭

trail plover
trail plover
terse canopy
#

ohhhhh

#

so just enter and a comma at the end you mean?

trail plover
#

and a list

terse canopy
#

🧐

trail plover
#

send me the code 😛

terse canopy
#

the .js file itself?

trail plover
#

or just the recipe itself

terse canopy
#

basically supplementaries squared adds a bunch of color variants to sacks and i just want to be able to use them in the recipe

trail plover
#

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')
terse canopy
#

oh cool ill make a tag for it thank you!

#

can i use that created tag in other .js files too then?

trail plover
#

yes ofc

terse canopy
#

dopedope tyty

#

yooo thank you sm🙏

trail plover
#

^^