#Is there a way to check if an item is in a creative menu or not?
54 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
im thinking it might be a way to very lazily hide the stuff that shouldnt be displayed in REI
since i think JEI only displays stuff in creative menus
if there isnt a method for that, maybe i could get an array of all items in each creative menu, and then just loop through them?
though uhh, it might be really inefficient lol
No jei doesnt
It can display stuff not in creative menus
Especially with mods and addons for JEI
What are you even trying to achieve?
The XY problem is when you really want to do X, and you think that Y can achieve X. However, you can't get Y to work, and so ask for help exclusively about Y.
This can lead to a lot of confusion from the people trying to help you, as Y can seem like a very random thing to want to do, and a lot of the time isn't the best way to achieve X anyway.
Its fine to ask about Y, just always include some context about X so you can be put on the right track if Y won't do X well, or there is an easier way to do X.
rei displays everything that gets registered, even if players arent supposed to see it at all
this
this is rare though no?
stuff like debug items
disabled items from quark
or stuff mods have registered but arent implemented
Ah that's because quark specifically integrates with JEI and not REI
yep
Isn't there a mod with converts JEI addons to REI ones?
You sure?
Hmm in that case there's no easy way to do it. Even if you could look through the creative inv it wouldn't be straightforward, fast, or memory efficient
You'd have to store every item in an array
i could use sets maybe
It would not be a good idea
The best way to do it in this case is just make yourself a few helper functions
Like a hideQk() that automatically adds the quark namespace then hides the item
And then do it all manually
Or create and array of all the items yourself and just loop through them that way
e.hide() supports arrays already
quark stores all its disabled stuff in an array https://github.com/VazkiiMods/Quark/blob/4011e63ff8c0044efedd63854a73ba4cc6b6155a/src/main/java/org/violetmoon/quark/integration/jei/QuarkJeiPlugin.java#L93
might try to use that lol
You might be able to pull that using reflection
I've only ever pulled functions but you could give it a shot
i barely know enough java for this but yeah im gonna try i guess
hmm weird
its only returning [1 backpack, 1 ravager_hide] [java.util.ArrayList]
const Quark = Java.loadClass('org.violetmoon.quark.base.Quark')
console.log(Quark.ZETA.requiredModTooltipHandler.disabledItems())
ah wait i just found out why
getting this error now```js
const IDisableable = Java.loadClass('org.violetmoon.zeta.module.IDisableable')
const BuiltInRegistries = Java.loadClass('net.minecraft.core.registries.BuiltInRegistries')
BuiltInRegistries.ITEM.forEach(item => {
let loc = BuiltInRegistries.ITEM.getKey(item)
if (loc.getNamespace().equals('quark') && !IDisableable.isEnabled(item)) {
console.log(loc.toString())
}
})
Paste version of message.txt from @ebon lion