Giter VIP home page Giter VIP logo

Comments (38)

mezz avatar mezz commented on September 13, 2024 7

Please use your very advanced human eyes to choose from the small remaining list.
This is a gui tool, you're not piping it into a dumb program upstream.

from justenoughitems.

mezz avatar mezz commented on September 13, 2024 4

There are a few upcoming features that mitigate most of the problems brought up here.

  1. an Item "history" which shows what you've looked up recently, including pinning
  2. using quotes for search terms that include spaces

from justenoughitems.

ShaunDreclin avatar ShaunDreclin commented on September 13, 2024 4

Just adding my voice to the crowd, regex is something I'm missing from NEI. If you're that worried about performance, make it an opt-in feature.

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024 3

you're not piping it into a dumb program upstream.

Are you sure? I'm pretty sure the API lets me get the search results...

(This is a bad joke. Please don't thumbs up.)

from justenoughitems.

dzaima avatar dzaima commented on September 13, 2024 3

The use for regex I had was doing something like +\d\d attack damage or searching for ME drives with at least 15k bytes used ([12345]\d\d\d of ). Make it optional and everyone will benefit.

from justenoughitems.

lrwerewolf avatar lrwerewolf commented on September 13, 2024 3

Just wanted to add my voice as well in favor of regex. My use case is for finding values where I don't actually know what item I'm searching for. As a specific example, I enjoy modpacks that include ProjectE. I find it useful to be able to use various ranges to track down items with specific EMC values. For example, if I'm looking for an item with maximum EMC, I might do something like "EMC: [1-9][0-9]{2},[0-9]{3},[0-9]{3}" which will show me anything from 100,000,000 EMC to 999,999,999 EMC. This is along the lines of dzaima's comment on Mar 5 where that user wished to look for things with double-digit attack damage or storage items holding a certain amount of stuff.

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024 2

It's really annoying to not have regular expressions to work with. There are multiple legit use cases.

Also. It's even more annoying that one can't use item id's.

I was really hyped about JEI since NEI had some issues (those npe's argh..) and I read a lot of positive. At first I thought well u gotta adjust your work pattern to JEI but to be honest there are too many things which are missing. Meh.

@mezz

from justenoughitems.

mezz avatar mezz commented on September 13, 2024 2

We have an OR, |.

from justenoughitems.

mezz avatar mezz commented on September 13, 2024 2

If I add start and end line matching, it would be broken by anything with ^ or $ in the name (requiring escaping), and I would have to change the existing prefix for $ (OreDict name) and ^ (colors).

The benefit to me seems minor, and it will only be used by a very tiny group of players, so I do not think the compromises required for implementing it are justified.

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024 1

@shadowfacts @way2muchnoise @mezz

Anchors are def missing imo
^chest$

Lets say I'm searching this item I can't remember the name of. I just know it was chest something. Since there are tons of items which include chest I want to exclude all items which do not start with chest.

^chest

The are those upgrade items which are called Machine Upgrade X Tier where X is a wildcard. I know the wildcard happens to be only letters. Since there are tons of upgrade items in any kitchensink pack I want to only find them above described upgrades

^machine upgrade [a-z]+ tier$

I'm looking for the best tinkers materials. I want to build a sword. I know the highest damage is 2 digit
So I'm going to pin those 5 items or of 100 down with

max Damage\: [0,9]{2}

When I'm building towards a larger goal I tend to list all the needed items separated by |

So I want to pin down one exact item. Often only possible in combination with the item id.

For example in exu2 there are often duplicates. There is the machine SAG mill and the deco block with the exact same name. Only possible to pin down through the ID.

I'm actually totally new to a anything beyond 1.7.10 - does minecraft still used id's at all? I think I've read something about removing id's in the future. Could be totally wrong tho

On mobile. Excuse any formatting errors. Examples may not be accurate since I don't have access to a minecraft instance right now.

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024 1

Just another pro for RegEx / ID's

How am I going to only display redstone? I mean just the dust. nothing else. I don't understand how this is supposed to work w/o RegEx or at least ID's

Okay I could combine it with the mod, @minecraft in this case. But that's still not really helpful

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024 1

Y'all do realize minecraft:redstone is just as much of an ID as 331 right?

from justenoughitems.

mezz avatar mezz commented on September 13, 2024

Sorry I have already explained to you on reddit, and twitter, and IRC.

No regex, I want JEI to run well :). You can search in the middle of names and use spaces for multiple requirements though. "Wren @ildcraf" is valid for instance.
Each character typed narrows down the search (except @ prefix for mod names and space) which makes it very fast and efficient. Regex doesn't have such nice properties, and I would need to run expensive comparisons across every item for each character typed, with no ability to cache results.

Regex is wonderful for all kinds of things, like searching across long sentences of text, refactoring code, or for complex queries, but searching against item names is not one of those things.

I don't think there are real circumstances where regex is more useful than the current search implementation, for this specific application.

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024

Actually you can compile the item list into a long string, and map the positions back to the items.

from justenoughitems.

mezz avatar mezz commented on September 13, 2024

That doesn't make any sense at all.
You're hyped up about regex without thinking about if it's even useful here.
Please go write a regex HTML parser and report back.

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024

I have a Lua parser in regex... does that count?

from justenoughitems.

mezz avatar mezz commented on September 13, 2024

Reference to this.

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024

You can parse HTML with regex.

from justenoughitems.

shadowfacts avatar shadowfacts commented on September 13, 2024

What actual regex features do you need for searching Minecraft items? The only one I can think of is | for or.

from justenoughitems.

way2muchnoise avatar way2muchnoise commented on September 13, 2024

I'm with @shadowfacts on this one. I don't see much use for regex. An OR feature would be nice but is it really needed? Seems like it is there already

from justenoughitems.

shadowfacts avatar shadowfacts commented on September 13, 2024

JEI doesn't match spaces, in JEI spaces function like an and operator. So searching for "machine upgrade tier" will match the upgrades you're looking for.

Minecraft still uses numerical IDs internally, but modders and end users don't care about those. Instead everything uses a registry name which is a combination of the domain (minecraft for vanilla, or the mod id) and the name.

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024

JEI doesn't match spaces, in JEI spaces function like an and operator. So searching for "machine upgrade tier" will match the upgrades you're looking for.

Well that's not what I want to do. But I understand.

Minecraft still uses numerical IDs internally, but modders and end users don't care about those

I did not care about them per se but they were pretty helpful.

from justenoughitems.

cleverca22 avatar cleverca22 commented on September 13, 2024

something i have thought of before, is a way to bookmark certain items, so i can get the same effect as searching for "item1|item2|item3" but i wont loose the entire thing if i right click the search box, or if RS winds up in auto-JEI mode and eats the entire search query

this way, i can pin the stuff i want to craft, and the missing components, and not loose them to a single misclick or badly behaving block

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024

I just want to see Electrical Furnace - none of the other:

Electrical Furnace
Electrical Furnace Tier 2
Electrical Furnace Tier 3
Electrical Furnace Tier 4
Electrical Furnace Tier 5

How am I going to do this? I have to pin it? Sounds complicated.

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024

Well the example was simple. There are way worse examples.
I mean I get it that you don't like the feature. Just tried to communicate that for me it's very stressful.

from justenoughitems.

mezz avatar mezz commented on September 13, 2024

Well the example was simple. There are way worse examples.
I mean I get it that you don't like the feature. Just tried to communicate that for me it's very stressful.

I'm sorry it's very stressful, but I believe I have given many reasons for why I will not support regex. What's stressful to me and the vast majority of players is very slow searches in big packs.

Are you sure? I'm pretty sure the API lets me get the search results...

Yeah, for conveniently using it to display items to the player in a GUI in a way that exactly matches JEI.
If you need something different from JEI, you can a search bar to your mod's GUI with your own behavior.

from justenoughitems.

KnightMiner avatar KnightMiner commented on September 13, 2024

It seems to me the main reason people here still want regex is the start and end line matching. Would that be expensive by itself without the rest of regex, maybe even if only used within exact matches?

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024

Use [[ and ]] instead of ^ and $.

from justenoughitems.

mezz avatar mezz commented on September 13, 2024

That may work. It seems obscure enough that the only people who would use it are here in this issue though.

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024

Add it to options.txt to make sure it doesn't get set by modpack authors.

from justenoughitems.

SoniEx2 avatar SoniEx2 commented on September 13, 2024

Append user UUID to config setting ID to make it impossible to enable by default.

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024

searching for

tin pickaxe head

I expect one item as result

what do I get? all the TINkers construct pickaxe heads. another reason for regex.

from justenoughitems.

KnightMiner avatar KnightMiner commented on September 13, 2024

That's not a reason for regex, that's a reason for whitespace matching.

from justenoughitems.

lrwerewolf avatar lrwerewolf commented on September 13, 2024

Gotta side with KnightMiner on that one, babbelnedd. If you know exactly what you're looking for, you don't need regex. The only time you need regex is when you need to select potentially more than one string. Your use-case could be solved by recognizing double quotes as markers for capturing white space.

from justenoughitems.

mezz avatar mezz commented on September 13, 2024

JEI can use quotes for capturing white space, "tin pickaxe head".
By default, searching mod names require the @ prefix. If you are finding Tinker's items with the search, you may have changed your search config settings so it doesn't require the prefix.

from justenoughitems.

boop5 avatar boop5 commented on September 13, 2024

from justenoughitems.

DaComputerNerd717 avatar DaComputerNerd717 commented on September 13, 2024

I wanted to put in a thought I had on the subject. I think regex should be allowed for the purpose of history. This also is a feature suggestion for that history system: If a history item lists only one item, clicking it will show recipes and uses, just like clicking the item in JEI. This is both useful for crafting, so you don't have to look through a list more than once, and it's actually a good purpose for regex since many terms are used in many items (just toggle F3+H and search for block or for item and you will see what I mean)

from justenoughitems.

OrdinatorStouff avatar OrdinatorStouff commented on September 13, 2024

Just FYI-- Yes, in ATM3 configs every search option is set to "enabled" by default except for "color."

These of course are free to be changed by end-users who prefer a less inclusive list of results. With these pack defaults, "tin" search alone has about 8 pages of results.

from justenoughitems.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.