Where Is It

Where Is It

346k Downloads

Enchantment filtering improvements

sudofox opened this issue · 3 comments

commented

Issue

I am often looking for a book with a particular enchantment, whether on its own or grouped with other enchants that I don't care about. However, it seems that any container with an enchanted book (or a tool of the same kind with different enchants) will be highlighted, rather than only showing the ones with that particular set of enchants.

This brings up a few possibilities, all of which I've experienced:

  • If only exact enchant matching is implemented: I don't want to click through a million books to find one nearby with that enchant
  • However, I might also be looking for a specific book with multiple enchants, so sometimes I will want it to show an exact match.
  • Much less common: I might just be looking for any enchanted books, for example, to de-enchant through a grindstone. (I'd more likely use enchanted rods/bows from fishing loot instead for this purpose.)

Some notes

  • In the first two situations though, it shouldn't highlight chests that contain unrelated enchanted books.
  • If I'm looking for an enchantment specifically, then I'd actually type it in rather than look for "Enchanted Book"
  • A tickbox (match enchantments exactly) or a config option or something might be useful in the settings tab, or perhaps a dropdown.

Dropdown example

Enchantment Matching ▼

  • Match any
  • Match all

Sorting changes?

Perhaps with multiple matching item types, they could be auto-sorted by their a couple different rules (item type, renamed items first, etc)


Thanks for taking the time to read over this, and I look forward to hearing your thoughts on it!

commented

Thanks for the detailed feedback and thoughts.

Currently, you can do only exact NBT matching if you have a reference (e.g. through REI favourites or ChestTracker memories) by holding shift when searching. For example, if you search for protection in REI and shift-search the Protection IV book, you can search for only Protection IV books without any other enchantments. This covers your second case, while your third case is default behaviour.

As for the first case, I'm trying to avoid any GUIs for the mod or special handling for NBT searching so I'm currently thinking of implementing a chainable command to search as an alternative for the hotkey. For example:

/wii search enchantment protection 4 enchantment unbreaking 3

searches for any items with Protection 4 and Unbreaking 3, alongside any other enchantments

/wii search item diamond_pickaxe enchantment fortune durability above 50%

searches for any diamond pickaxe with any level of Fortune above half durability

/wii search name exact "Building Materials"

searches for any item with a custom name of "Building Materials" such as a shulker box, case insensitive

/wii search tag music_discs

searches for any music discs.

I'll have a look soon about implementing this, but let me know if you have any feedback or ideas about this.

commented

I'm also hoping for the feature to be implemented!

CLI is pretty nice. Btw https://github.com/Earthcomputer/clientcommands also provides a /finditem command which might solve some of the cases.

But ofc I wish WII can have this function built in since what the author suggests here is much more powerful. Besides, WII has a nice UI.

commented

Implemented as of Where Is It 2.0.19; it's the /whereis command