MC-WIKI.net
Held Item Info Wiki › Guides › Using Enchantment Filters and showOnlyFilteredEnchantments in Held Item Info

Using Enchantment Filters and showOnlyFilteredEnchantments in Held Item Info

guide

Held Item Info lets you decide exactly which enchantments show up in an item's tooltip, using its enchantment filter settings. Everything here is configured through the mod's interface rather than through crafting or any in-game item.

Where the Enchantment Options Live

Open the mod's settings screen, titled Held Item Info Config. Inside, you'll find a group of options under enchantments. Two of them work together:

  • enchantments — the section holding the enchantment filter controls.
  • showOnlyFilteredEnchantments — decides whether your filter list acts as an allow-list or a deny-list.
  • filteredEnchantments — the actual list of enchantments you want to target.

How showOnlyFilteredEnchantments Works

This single option flips the meaning of your filter list:

  • Set it to Yes and the tooltip will display only the enchantments you've listed below. Anything not on your list is left out.
  • Set it to No and the tooltip will display everything except the enchantments you've listed. Your list becomes a set of exclusions.

So the same list of enchantments produces opposite results depending on this one toggle. Pick Yes when you want a narrow view of a few enchantments, and No when you'd rather hide a handful of noisy ones and keep the rest.

Filling In filteredEnchantments

The filteredEnchantments field is where you type the enchantments you want to include or exclude. Two things to keep in mind:

  • Enter enchantment IDs rather than their display names. For example, use `minecraft:silk_touch` instead of writing out "Silk Touch".
  • If you're having trouble locating the text field to type into, press TAB a few times to cycle through the available fields until you reach it.

Add each enchantment you care about to this list, then set showOnlyFilteredEnchantments to match the behaviour you want.

Choosing Between the Two Modes

A quick way to think about it:

  • Allow-list mode (Yes): only the enchantments in your list appear. Good when you only care about a couple of specific enchantments on your gear.
  • Deny-list mode (No): every enchantment appears except the ones in your list. Good when most enchantments are useful to see but a few just add clutter.

Both modes use the same filteredEnchantments list, so switching between them is just a matter of changing the one option.

While you're adjusting what shows up, a few other settings in Held Item Info Config affect the tooltip's overall presentation:

  • maxLines — caps how many lines the tooltip can show, counting the item name.
  • respectHideFlags — when enabled, information hidden by component properties stays hidden.
  • showHiddenLinesCount — displays how many extra lines exist beyond what's shown.
  • baseFadeDuration and fadeDurationPerExtraLine — control how long a tooltip lingers before fading, with longer tooltips lasting longer.
  • offsetPerExtraLine — shifts the tooltip vertically as it gains lines, by default bringing it nearer the hotbar.

Adjusting the enchantment filter won't change these; they simply govern the tooltip's size, visibility, and timing.

Quick Recap

To control which enchantments appear, open Held Item Info Config, add enchantment IDs to filteredEnchantments, then set showOnlyFilteredEnchantments to Yes for an allow-list or No for a deny-list. If you can't find the input field, tap TAB a few times to move between fields.