Add a variant of 'unique name' which doesn't include the damage metadata
tekacs opened this issue · 3 comments
Issue type:
➕ Feature request
Description
With the new string operations it's certainly possible (really only with a regex) to strip out the metadata number from 'unique name', but it seems like a sufficiently common operation (matching items without metadata, as most mods support) that there's little harm in having a separate operator for this?
This should be a fairly simple request if accepted and I can implement it myself.
If you're trying to compare items, why are you looking at names at all? We have operators that let you compare items directly.
For filtering it might indeed be better to use one of the custom item comparator operators.
But there are cases where it might indeed make sense to retrieve only the item name of an itemstack.
Feel free to submit a PR for this if you're up for it :-)
@josephcsible I'm building big regexes to test the regex support. 😋