#Hiding items in JEI, missing ) after arguments list

28 messages · Page 1 of 1 (latest)

torpid canopy
#

I receive this error when attempting to reload client scripts:
[Server thread/ERROR]: ! event.hide('mysticalagriculture:*_reprocessor'):9: Error loading KubeJS script: client_scripts:script.js': missing ) after argument list (client_scripts:script.js#9)

I have successfully disabled the recipes for these items with the same syntax; event.remove({output: '/mysticalagriculture:.*_reprocessor'})

The default event.hide('minecraft:cobblestone') also fails to work when tested.

winged zephyr
#

You need to wrap the whole thing in {}

#

Inside the event

#

So after the => and before the end )

torpid canopy
#

Feels like that should be included in the auto-generated scripts

winged zephyr
#

@dusk chasm maybe something that should be added if it isn't

torpid canopy
#

Wrapping with {} fixes the error but does not fix the behavior

#

Is the event itself deprecated now? Wiki says onEvent('jei.hide.items', event => {}

#

Nope, onEvent is worse lol, is what I assumed from the migrating to KubeJS 6 section

#

Ah NVM, it seems that /kubejs reload client_scripts is not enough to refresh the JEI. After f3+t it seems to have worked.

winged zephyr
#

Yeah you need f3 t

#

And the other one is old outdated notation

torpid canopy
#

Well, maybe not. Huh. It definitely did work once, I added another thing to the list to hide and now, although there are no errors in the log, all of the items are back.

winged zephyr
#

If it suddenly breaks, you either have a typo with an id, or jei broke,as it often does

#

There's no checks in jei if the IDs exist, so it just breaks every time

#

Requires restart to fix

torpid canopy
#

Seems like it was missing an / at the end of the id

dusk chasm
#

actually you arent supposed to wrap // in ''

torpid canopy
#

Also seems like the missing {} might have been user error or just Notepad freaking out because they did exist earlier in this screen I sent to a friend

dusk chasm
#

its not '/id/' its just /id/

#

both will work but raw regex will be better

torpid canopy
#

Good to know

#

Giving it one more test but I think it is fixed

#

Yea, seems like it's working now.

#

So begins attempting to convert most of Mystic Agriculture into Occultism rituals lmao

fringe mesa
dusk chasm
#

event.hide(/minecraft:apple/)