#ItemStack 'result' can't be empty!

21 messages · Page 1 of 1 (latest)

brittle oxide
#

Was making some custom recipes for my modpack, was all going fine until I got to the recipe for upgrading the Magnet Upgrade in Sophisticated Backpacks. There are two recipes for this, one uses the ID sophisticatedbackpacks:advanced_magnet_upgrade (this one works fine with the new recipe) the other uses the ID sophisticatedbackpacks:advanced_magnet_upgrade_from_base which is where the problem starts. When I reload with the new recipe it comes up with the error "ItemStack 'result' can't be empty!" but it is not a typo in the ID as when I run the code to remove this recipe it works. I've tried rewriting it different ways and none work, they all come up with the same error. Any help would be appreciated (I will post the code in the thread).

worn crestBOT
#

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

brittle oxide
#

event.shaped(
Item.of('sophisticatedbackpacks:advanced_magnet_upgrade_from_basic', 1),[
' A ',
'BCB',
'DEF'
],{
A: 'minecraft:diamond',
B: 'minecraft:gold_ingot',
C: 'sophisticatedbackpacks:magnet_upgrade',
D: 'alexscaves:scarlet_neodymium_ingot',
E: 'minecraft:redstone',
F: 'alexscaves:azure_neodymium_ingot'
}
)

#

it says the error is on the line 193 which is the event.shaped line

west crest
#

your item id is wrong

#

its an item id not a recipe id

brittle oxide
#

but that's how I wrote all of the previous recipes and they work fine

#

or is it because there are multiple recipes for the same item so I can't use the item.of command more than once as the recipe is not called the same as the item like it is for most other items

#

so just change it to recipe.of?

#

that doesn't work cuz Recipe.of isn't a thing

west crest
#

wtf no

#

you can use Item.of as many times as you want and make as many recipes for the same item as you want

brittle oxide
#

then why doesn't it work

#

there are two recipes for the same item

west crest
#

you want an item id

brittle oxide
#

one has the ID "sophisticatedbackpacks:advanced_magnet_upgrade" which is the one that works and is the same as the item ID and the other is "sophisticatedbackpacks:advanced_magnet_upgrade_from_basic" which is different from the item id

#

so does that make it impossible to change the from_basic recipe as it isn't the same name as the item?

#

or can I just change the Item.of to the advanced_magnet_upgrade without having to worry about overwriting the other recipe?

#

(I'm good at overthinking things and I hate it)

#

ok, I changed the item.of back to the item and it didn't overwrite the previous one, thx for the help