#Unable to parse recipe output filter `0`

34 messages · Page 1 of 1 (latest)

desert wave
#

Hello,
I was just presented with an error I do not understand (see title). What could be the cause of this?

Log: https://gist.github.com/IchHabeHunger54/e002f9002e06b61d3653c4eb80fa13f5
Script (server_scripts/main.js): ```js
ServerEvents.recipes(event => {
for (let name in global.itemsToRemove) {
event.remove({output: name});
}
});

ServerEvents.tags('item', event => {
for (let name in global.itemsToRemove) {
event.removeAllTagsFrom(name);
}
});
``` global.itemsToRemove is a string array, defined in a startup script.

Any help would be greatly appreciated.

jolly wigeonBOT
#

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

native lark
#

the logs say the error is happning on line 5

#

that doesnt match up with the script you posted

#

ah

#

you are using for x in which will set x to the keys of the iteration target

#

use for x of which will set to the values

desert wave
#

Fix one bug, and another one comes up.
Changing it to for x of everywhere yields a new bug, this time in my startup script.
Log: https://gist.github.com/IchHabeHunger54/71f767e2fe091e79f5f8afd2b6e63847
Script: ```js
global.itemsToRemove = [
// values here
];

ItemEvents.modification(event => {
for (let name of global.itemsToRemove) {
event.modify(name, item => {
item.burnTime = 0;
item.foodProperties = null;
});
}
});
```As I take it, foodProperties no longer exists. I was following this tutorial, which I now assume is outdated: https://kubejs.com/wiki/tutorials/item-modification
What would the replacement be?

#

Ah, and when commenting out the item.foodProperties = null line, the original issue also isn't fixed.

native lark
#

item.override(type, value)

#

cause datacomponenttype is a registry object you can just pass the resource location and rhino will look up the object for you

native lark
#

where anything setWhatever(X x) can be written as whatever = x, and similar for getters and issers (isWhatever() can be whatever)

desert wave
desert wave
native lark
#

thats a completely different error

desert wave
#

wait did I upload the wrong file

native lark
#
[00:06:39] [ERROR] ! RegistryAccessContainer.java#150: Failed to read result:strict_item_stack from recipe suppsquared:candle_holders/gold_candle_holder_soul[minecraft:crafting_shaped]: java.util.NoSuchElementException: No value present
[00:06:39] [ERROR] ! java.util.NoSuchElementException: No value present
desert wave
#

hold up, let me try and regenerate that

native lark
#

tho i believe it also just skips that recipe

desert wave
#

I did some digging on this already, apparently the recipe in question is missing load conditions

native lark
#

remove that recipe by id

#

??tips

bronze gladeBOT
# native lark ??tips

To find a recipe's ID, turn on advanced tooltips (F3 + H) then hover over the RECIPE OUTPUT in JEI, or the exclamation mark in REI.
You can then use this in any recipe filter:
{id: 'recipe ID here'}
You can use this, for example, to remove specific recipes:
event.remove({id: 'recipe ID here'})

native lark
#

make sure to report that to the mod author

desert wave
native lark
#

youll have to use the json override then and hope the mod fixes their stuff

desert wave
#

issue on the Supp Squared repo already exists fwiw

#

alright then, thanks a bunch for the help!