JustEnoughItems icon indicating copy to clipboard operation
JustEnoughItems copied to clipboard

Add another search filter, * for light level

Open Prospector opened this issue 9 years ago • 12 comments

Sometimes it's hard to find blocks with lighting for a build. Could be useful, if we could just do something like "" for all blocks with light value, and "[number]" to specify the light value to search for.

Prospector avatar Jul 20 '16 02:07 Prospector

kraineff avatar Jul 20 '16 02:07 kraineff

That's an interesting idea but it would not be able to detect lights that require redstone to activate.

mezz avatar Jul 20 '16 06:07 mezz

True, but it would still be useful for some things. Perhaps mods using the api can specify that a block (or item, like in dynamic lighting's case) can output light, and under what conditions (can be displayed in tooltip maybe)

Prospector avatar Jul 20 '16 07:07 Prospector

I think this idea would be more useful as part of a mod that adds light levels to tooltips, then JEI could search the tooltip for it and you can see the specific light level on the tooltip.

mezz avatar Jul 20 '16 07:07 mezz

The problem I see with placing it in the tooltip is those can get quite cluttered with all the potential information you might want to search for, light level is just one example along side flamability or transparency, plus if you put the data in the tooltip it could become hard to tell whether the block has a light level, or just references light in a different way (eg, special transparency, color, specifically stating no light level, etc.) Basically, it would be nice to have a clean way to do some of those without depending on a string that may exist elsewhere.

So what about if the idea is expanded to do more than just a single task? Basically, the * character would check for a pre-made category of items instead of just light level. As in, *light searches for blocks that emit light, *food searches for items that can be eaten, etc. On top of this, maybe add an API for mods to add their own categories for this search (like Tinkers Construct tool parts as an example) or to add items to an existing category that don't fit the dynamic criteria (like a vanilla redstone lamp that the block technically does not emit light, but in world interactions cause it to). The idea would be searching for something as a human you know is true, but cannot otherwise be searched for in JEI

It shouldn't impact performance too much overall if implemented, such as by creating a cached list once on startup.


I would understand if this idea is better suited for an addon, though does JEI support addons defining custom search strings prefixes? It would be hard to add if that features does not exist.

KnightMiner avatar Jul 22 '16 02:07 KnightMiner

ooh I like that idea. A general "type" filter

Prospector avatar Jul 22 '16 06:07 Prospector

I am going to bump this from it's eight-year slumber because I love light level emitting blocks 🙂

GalexY727 avatar Jul 14 '24 10:07 GalexY727

Bumping as well. I've had dozens of times where I would've used this, because I needed some form of luminous block for a build and wanted to compare all them

CardsChris89 avatar Jul 15 '24 03:07 CardsChris89

My thoughts upon revisiting this issue is * should not be used for this. Different character is reasonable, but * is used in many searches to indicate "wildcard" value, which would both be misleading and potentially prevent such a feature from being added in the future (unless it already exists, been too long since I tried)

KnightMiner avatar Jul 18 '24 16:07 KnightMiner

Different character is reasonable...

That's completely understandable. Perhaps something strange such as [? Maybe =... I don't know off the top of my head if these are already used.

GalexY727 avatar Aug 01 '24 02:08 GalexY727

Bumping. Would be very useful to search light emitting blocks (for building purposes) and other types for other purposes in medium to large sized modpacks.

Also agree * may not be the best character. ‘:’ maybe, doesn’t matter too much as long as it’s not a common formatter/regex char like *.

MattM123 avatar Jun 08 '25 14:06 MattM123

Worth noting that this could be implemented easily enough in a modpack by just making a tag that contains all light blocks then using the tag prefix with the tag name.

I do stand by my earlier suggestion that it shouldn't be a light level specific character, but a registry of categories that JEI and addons can add to. So something like :light or :light15 makes more sense than simply :.

KnightMiner avatar Jun 10 '25 18:06 KnightMiner