How can I filter items with a certain enchantement? [duplicate]
![How can I filter items with a certain enchantement? [duplicate] - A Person Buying From a Grocery How can I filter items with a certain enchantement? [duplicate] - A Person Buying From a Grocery](/assets/images/how_can_i_filter_items_with_a_certain_enchantement_duplicate_0.jpeg)
I am trying to build a custom Adventure Island. At this moment I am trying to limit the allowed items on this island. I'm trying to do this by filtering on a certain enchantment which is not item-specific.
For example.
When you want to filter an wooden sword with a custom name, you use this command:
/testfor @p[r=5] {Inventory:[{tag:{display:{Name:"Custom Sword"}}}]} <
When you want to filter a wooden sword with a custom name and specific enchantement, you can use:
/testfor @p[r=5] {Inventory:[{tag:{display:{Name:"Custom Sword"},ench:[{id:16,lvl:1}]}}]} <
But how can I filter on items with a specific enchantment on ANY item? I tried:
/testfor @p[r=5] {Inventory:[{tag:{ench:[{id:16,lvl:1}]}}]} <
But this ain't work. Does anyone know how to solve this issue?
Pictures about "How can I filter items with a certain enchantement? [duplicate]"
![How can I filter items with a certain enchantement? [duplicate] - Person Holding Magnifying Glass How can I filter items with a certain enchantement? [duplicate] - Person Holding Magnifying Glass](/assets/images/how_can_i_filter_items_with_a_certain_enchantement_duplicate_1.jpeg)
![How can I filter items with a certain enchantement? [duplicate] - First Aid and Surival Kits How can I filter items with a certain enchantement? [duplicate] - First Aid and Surival Kits](/assets/images/how_can_i_filter_items_with_a_certain_enchantement_duplicate_2.jpeg)
![How can I filter items with a certain enchantement? [duplicate] - Variety of Items on a Wooden Table How can I filter items with a certain enchantement? [duplicate] - Variety of Items on a Wooden Table](/assets/images/how_can_i_filter_items_with_a_certain_enchantement_duplicate_3.jpeg)
Minecraft Sky Factory 3: Item Filters tutorial
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Julia Avamotive, MaurĂcio Mascaro, Roger Brown, Alexander Grigorian