Integrated Dynamics · Addon guide · Advanced
How to Filter NBT Data & Enchantments with Integrated NBT
Mob farms quickly clog your storage with damaged, randomly enchanted armor and tools that standard item filters cannot easily separate. In this advanced guide, you will learn how to use the Integrated NBT addon alongside Integrated Dynamics and Integrated Tunnels to extract deeply nested NBT tags, filter specific enchantments, and build a smart, lag-free mob drop sorting system.
What you need
- Integrated Dynamics, Integrated Tunnels, and Integrated NBT (plus Cyclops Core and Common Capabilities)
- Logic Cables and at least one Variable Store
- Logic Programmer (portable or block version) and a Labeller
- NBT Extractor (from the Integrated NBT addon)
- Inventory Reader and Display Panel
- Item Interface and Item Exporter (from Integrated Tunnels)
- Plenty of blank Variable Cards
- Chests or storage containers for your mob farm input and sorted outputs
- A sample enchanted item or Enchanted Book for testing
Step by step
1Set Up the Physical Sorting Network
Place your main mob farm input chest, a trash can (or disposal chest), and a chest for valuable enchanted gear. Connect all of them using Logic Cables. Attach an Inventory Reader to the input chest, an Item Interface to the valuable storage chest, and an Item Exporter to the trash chest. Place a Variable Store and a Display Panel anywhere along the cable network to hold your logic and debug outputs.
Tip: Use the Labeller on every Variable Card you create; complex NBT logic becomes impossible to troubleshoot without clear names.
2Read the Target Item's Raw NBT
Place a sample enchanted sword or book into the very first slot (Slot 0) of your input chest. Open the Logic Programmer and create an Integer Variable Card set to 0. Next, open the Inventory Reader on the input chest, find the 'Slot Item' aspect, and insert your Integer 0 card to output a card representing the item in Slot 0. Finally, take that Slot Item card back to the Logic Programmer, search for the 'Item NBT' operator, and bind a new Variable Card to extract the item's raw NBT compound tag.
Tip: Place the Item NBT card into your Display Panel right now (and put the referenced cards in the Variable Store) to visually inspect the raw JSON-like NBT structure on screen.
3Configure the NBT Extractor
Instead of manually chaining multiple NBT lookup operators in the Logic Programmer, place down the NBT Extractor block and connect it to your network. Insert your 'Item NBT' Variable Card into the top input slot of the NBT Extractor (making sure its parent cards are inside the Variable Store). The GUI will immediately render a collapsible tree of the item's actual NBT tags, such as Damage, Enchantments, or StoredEnchantments.
Tip: If the NBT tree is blank, verify that the item is still in Slot 0 of the chest and all required dependency cards are inside the Variable Store.
4Extract Nested Enchantment Data
In the NBT Extractor GUI, navigate through the tag tree to find the enchantment data—typically under the 'Enchantments' list for tools/armor, or 'StoredEnchantments' for Enchanted Books. Click on the specific nested tag you want to isolate, such as the enchantment 'id' string or 'lvl' short/integer value. Insert a blank Variable Card into the bottom output slot of the NBT Extractor to generate a card that automatically extracts that exact nested path.
Tip: Depending on your mode selection in the NBT Extractor, you can output a dynamic Operator card that can be applied to any item, rather than just reading the static value from Slot 0.
5Build an Item Filtering Predicate
To filter items dynamically in an Item Exporter, you need an Operator (Predicate) that takes an Item and returns a Boolean (True/False). Open the Logic Programmer and use the 'Pipe' operator to chain the general 'Item NBT' operator into the custom extraction operator you created with the NBT Extractor. Next, pipe that output into a relational operator—such as 'Equals' or 'List Contains'—comparing it against a String Variable Card containing your desired enchantment ID (for example, 'minecraft:mending').
Tip: Check the in-game guide 'On the Dynamics of Integration' under the Functional Programming section if you need a refresher on applying and piping operators.
6Automate the Mob Farm Exporter
Switch your physical setup so the Item Interface is on the input chest and the Item Exporters are on the destination chests. Open the Item Exporter attached to your valuable loot chest, scroll to the 'Export Items Predicate' aspect, and insert your final Predicate Variable Card. Place every single dependent Variable Card into the Variable Store. The exporter will now scan all items in the input chest, run your NBT extraction predicate on each one, and only pull out items that match your exact enchantment criteria.
Tip: To automatically trash unenchanted or damaged gear, use the 'Not' operator on your predicate card or check if the 'Damage' NBT tag is greater than zero.
How it works
In Integrated Dynamics, Variable Cards do not store static snapshots of data; they store lazy pointers to logic operations. When you read an item's NBT and pass it through the NBT Extractor, the resulting card holds a navigational path (like a JSON path) that evaluates in real time every network tick.
Because Item Exporters can accept a Predicate (an operator that accepts an Item input and returns a Boolean output), you cannot just feed it a static boolean from Slot 0. By combining the 'Item NBT' operator and the NBT Extractor's path operator using the 'Pipe' function, you create a reusable function. The Item Exporter feeds every item in the connected inventory through this function one by one, extracting the nested NBT on the fly and only moving the item if the final evaluation returns True.
The Variable Store acts as the central memory bank for the network. Whenever a card references another card, the referenced card must sit inside a Variable Store on the same cable network so the exporter or display can resolve the full chain of logic.
Common mistakes
- Forgetting to put dependency cards in the Variable Store: If your Display Panel or Item Exporter shows an error symbol, you likely left one of the intermediate cards (like the String constant or the Pipe operator) in your player inventory.
- Confusing 'Enchantments' with 'StoredEnchantments': Minecraft stores enchantments on tools and armor under the 'Enchantments' NBT list, whereas Enchanted Books use the 'StoredEnchantments' list. Your filter must target the correct tag for the item type.
- Passing a static Boolean instead of a Predicate: Using the ' Export Items Boolean' aspect with a slot reader only checks one slot. For full-chest sorting, you must build an Operator card and insert it into the 'Export Items Predicate' aspect.
- Type mismatch in NBT comparisons: Enchantment levels in NBT are often stored as Short or Integer tags, and IDs as String tags. Ensure your comparison Variable Cards in the Logic Programmer match the exact data type output by the NBT Extractor.
FAQ
Why is my NBT Extractor GUI completely empty when I insert an NBT card?
The NBT card must actively evaluate to a valid NBT compound tag. Make sure the target item is currently present in the chest slot being read, has actual NBT data (vanilla stone has none), and all supporting cards are inside a connected Variable Store.
How can I filter items that have NO NBT data at all, like clean mob drops?
Use the 'Item Has NBT' operator in the Logic Programmer, pipe it into a 'Not' operator to invert the boolean output, and place that predicate into the Item Exporter leading to your normal storage.
Can I filter an item based on durability using this same method?
Yes, most modern Minecraft versions store item damage inside the 'Damage' integer tag within the item's NBT. You can extract the 'Damage' tag with the NBT Extractor and check if it equals zero for pristine items, or simply use the built-in 'Item Damage' operator in the Logic Programmer.
Will scanning deep NBT tags on a massive mob farm cause server lag?
Integrated Dynamics is highly optimized, but evaluating complex NBT predicates across hundreds of slots every tick can add up. Open the part settings on your Item Exporter and increase the tick interval (lowering the operation frequency) to keep server tick times healthy.
By pairing the visual tree navigation of the NBT Extractor with functional operator piping in the Logic Programmer, you can effortlessly filter deeply nested enchantments and NBT data to automate even the messiest mob farm.