#Removing and creating new recipes for Sophisticated Storage

40 messages · Page 1 of 1 (latest)

unkempt quarry
#

I'm gregifying the recipes from Sophisticated Storage and wanted to create recipes on the assembler but I'm having an issue with the items of the mod.

The barrels have an id like this:
Item.of('sophisticatedstorage:barrel', '{woodType:"oak"}')

Because of the separation and the ',' in the item id I'm having a hard time creating a recipe with it.
It there a way to create recipes with this id's?

delicate groveBOT
#

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

runic kernel
#

theres no comma in the ID
what are you struggling with?

unkempt quarry
#

because i need a recipe for each wood type but the ID is the same for all wood types

#

for example, the recipe ends looking like this:
event.recipes.gtceu.assembler(Item.of('sophisticatedstorage:barrel', '{woodType:"oak"}'))

.itemInputs("minecraft:redstone_torch", "6x minecraft:oak_planks", "2x minecraft:oak_slab")

.itemOutputs(Item.of('sophisticatedstorage:barrel', '{woodType:"oak"}'))

.duration(100)
.EUt(16);

runic kernel
#

then just make a list of wood types and iterate over them hmmm

unkempt quarry
#

how?

#

something like this?:

const woodTypes = [
"oak",
"spruce",
"birch",
"jungle",
"acacia",
"dark_oak",
"warped",
"crimson",
];

runic kernel
#
let woodTypes = ['oak', 'spruce', ...]
woodTypes.forEach(type => {
  ...
  Item.of('sophisticatedstorage:barrel', `{woodType:"${type}"}`)
  ...
})
unkempt quarry
#

it says that the "id" is null

#

the id for the barrel

runic kernel
#

what says that

#

show me the exact error

#

and the way you wrote it too

unkempt quarry
#

[12:50:22] [ERROR] ! Soph_Storage_x_GT.js#11: Failed to create recipe for type 'gtceu:assembler': Failed to create recipe for type 'gtceu:assembler' with args [1 barrel: ItemStack]
[12:50:22] [WARN] Soph_Storage_x_GT.js#11: Tried to call a function on an errored recipe! (Failed to create recipe for type 'gtceu:assembler')
[12:50:22] [ERROR] ! Soph_Storage_x_GT.js#11: Error in 'ServerEvents.recipes': TypeError: Cannot find default value for object.
[12:50:22] [INFO] Posted recipe events in 2.713 s

#
event.recipes.gtceu.assembler(Item.of('sophisticatedstorage:barrel', `${woodType}`))
.itemInputs("minecraft:redstone_torch", "6x minecraft:oak_planks", "2x minecraft:oak_slab")
.itemOutputs(Item.of('sophisticatedstorage:barrel', `${woodType}`)
.duration(100)
.EUt(16);
runic kernel
#

you didnt copy what i wrote correctly

#

not even close..

unkempt quarry
#

what is different? the name of the const?
I typed the whole recipe

runic kernel
#

mine:

Item.of('sophisticatedstorage:barrel', `{woodType:"${woodType}"}`)

yours:

Item.of('sophisticatedstorage:barrel', `${woodType}`)

and its also missing a bracket at the end

unkempt quarry
#

yeah, im not worried about the const rn. the recipe im trying to set is this

event.recipes.gtceu.assembler(Item.of('sophisticatedstorage:barrel', `{woodType:"oak"}`))
.itemInputs("minecraft:redstone_torch", "6x minecraft:oak_planks", "2x minecraft:oak_slab")
.itemOutputs(Item.of('sophisticatedstorage:barrel', `{woodType:"oak"}`))
.duration(100)
.EUt(16);
runic kernel
#

im not talking about the constant xD

#

i rewrote it to make it more obvious

#

w>

unkempt quarry
#

like this then?

event.recipes.gtceu.assembler(Item.of('sophisticatedstorage:barrel', `{woodType:"${woodType}"}`))
.itemInputs("minecraft:redstone_torch", "6x minecraft:oak_planks", "2x minecraft:oak_slab")
.itemOutputs(Item.of('sophisticatedstorage:barrel', `{woodType:"${woodType}"}`))
.duration(100)
.EUt(16);
runic kernel
#

looks good, assuming its inside a loop

unkempt quarry
#

but it keeps showing the same error

runic kernel
#

in that case maybe gtceu wants something else
im not fmailiar with that kjs addon

#

best to ask the creator

unkempt quarry
#

k

#

what happens is that the "," on those recipes is used to separate id's for the inputs

#

like this

.itemInputs("minecraft:redstone_torch", "6x minecraft:oak_planks", "2x minecraft:oak_slab")
runic kernel
#

maybe it needs to be a list?

#
.itemInputs(["minecraft:redstone_torch", "6x minecraft:oak_planks", "2x minecraft:oak_slab"])
unkempt quarry
#

let me try

#

but the code i just wrote works
but this one doesn't:

.itemOutputs(Item.of('sophisticatedstorage:barrel', `{woodType:"${woodType}"}`)
#

wait, think i got it

#

it worked, the issue was not on the id. . .

#

it was the recipe id the one breaking the code. . .

#

but thanks, i got it solved