Unable to manipulate REI entries of items, that don't "exist"
SplendidAlakey opened this issue ยท 12 comments
Minecraft Version
1.19.2
KubeJS Version
1902.6.0-build.128
Rhino Version
1902.2.2-build.264
Architectury Version
6.3.56
Forge/Fabric Version
0.67.1
Describe your issue
- Create a simple script to hide anything at all from Charm in REI
// priority: 0
REIEvents.hide('item', event => {
event.hide('charm:azalea_planks')
})
- Change Charm config to disable whatever item you are trying to hide from REI, in my case Azalea wood, so we set
"AzaleaWood Enabled" = false
- Launch the game and observe that the entry was not hidden from REI
Recipe editing scripts work just fine. E.g. removing the same item's recipe works.
Crash report/logs
https://gist.github.com/SplendidAlakey/608c3b2132ac4965a4a733f2f1c999fa
Hmm, this might be the same as #299; can you verify the items are still found in a Creative Tab?
This might be an REI issue in that case? We don't really do anything special with the ingredients here, so it might be that wrapping them to EntryStack, it tries to go through the creative search somehow
Should I report this to REI or is it better, if you do it? Since you could also explain the way things work on your side, etc.
I'm already talking to the REI dev about it, hopefully we can find a solution for this soon ^^
That's not how you hide items, you would need to do this:
REIEvents.hide('item', event => { event.hide('charm:azalea_planks') })
Ok, weird. First of all, sorry, the example you provided is what I actually use, but with multiple entries like so REIEvents.hide('item', event => { event.hide(['charm:azalea_planks','charm:azalea_button'])})
. I just quickly copied the script I wrote in the original post from the wiki for a test. However, it turns out the issue is probably some mod incompatibility, rather than Charm + KubeJS combo itself, because that script works with just the 2 mods, but not in a pack. I will investigate and come back with what I find...
I figured it out. Disabling the item you want to hide from REI in Charm's config, prevents it from being hidden by KubeJS. Enabling items and then filtering them only with KubeJS is not an option, as, for example, Azalea wood not only adds recipes, but also completely replaces Azalea wood generation, which I want to leave disabled.
I updated the initial message and logs to reflect my findings.
I don't think this is an REI issue, so no. We simply need to figure out a better way to wrap input strings (or other inputs) to REI's entry types, but that's exactly what I have been struggling with
This should of been solved by #678, can someone confirm that?