-
Notifications
You must be signed in to change notification settings - Fork 0
26.2 Item Classification and Mod Compatibility
Dasik (Rifaditya) edited this page Aug 21, 2026
·
1 revision
| System Parameter | Value |
|---|---|
| Classification Method | DurabilityHelper.classifyItem(ItemStack) |
| Caching Engine | Thread-safe ConcurrentHashMap<Item, ItemCategory>
|
| Supported Categories | 12 Enum Types |
| Component Inspection |
DataComponents.EQUIPPABLE, TOOL, GLIDER
|
| Tag Inspection |
#minecraft:swords, #minecraft:spears, #minecraft:axes, etc. |
To ensure zero tick lag during high-frequency combat and block-breaking loops, item classification is cached in CATEGORY_CACHE and resolved through strict prioritized rules:
flowchart TD
A[ItemStack] --> B{Tag: #minecraft:swords?}
B -->|Yes| C[SWORD]
B -->|No| D{instanceof TridentItem or Items.TRIDENT?}
D -->|Yes| E[TRIDENT]
D -->|No| F{Tag: #minecraft:spears?}
F -->|Yes| G[SPEAR]
F -->|No| H{instanceof MaceItem or Items.MACE?}
H -->|Yes| I[MACE]
H -->|No| J{instanceof BowItem or Items.BOW?}
J -->|Yes| K[BOW]
J -->|No| L{instanceof CrossbowItem or Items.CROSSBOW?}
L -->|Yes| M[CROSSBOW]
L -->|No| N{instanceof ShieldItem or Items.SHIELD?}
N -->|Yes| O[SHIELD]
N -->|No| P{Items.ELYTRA or DataComponents.GLIDER?}
P -->|Yes| Q[ELYTRA]
P -->|No| R{Armor Tags or DataComponents.EQUIPPABLE?}
R -->|Yes| S[ARMOR]
R -->|No| T{Tool Tags, Tool Classes, or DataComponents.TOOL?}
T -->|Yes| U[TOOL]
T -->|No| V[OTHER / Uncategorized Modded Item]
- Matches items tagged in
#minecraft:swords. - Includes all vanilla swords (Wood, Stone, Iron, Gold, Diamond, Netherite) and any modded swords implementing the standard tag.
- Matches items tagged in
#minecraft:spears.
- Matches
Items.TRIDENTor any class extendingTridentItem.
- Matches
Items.MACEor any class extendingMaceItem.
- Matches
Items.BOWor any class extendingBowItem.
- Matches
Items.CROSSBOWor any class extendingCrossbowItem.
- Matches
Items.SHIELDor any class extendingShieldItem.
- Matches
Items.ELYTRAor any item stack possessing theDataComponents.GLIDERcomponent.
- Matches tags
#minecraft:head_armor,#minecraft:chest_armor,#minecraft:leg_armor,#minecraft:foot_armor. - Matches any item stack with
DataComponents.EQUIPPABLEwhose slot isHEAD,CHEST,LEGS, orFEET.
- Matches tags
#minecraft:axes,#minecraft:pickaxes,#minecraft:shovels,#minecraft:hoes. - Matches
Items.SHEARS,Items.FISHING_ROD,Items.FLINT_AND_STEEL,Items.BRUSH,Items.CARROT_ON_A_STICK,Items.WARPED_FUNGUS_ON_A_STICK. - Matches class instances of
AxeItem,HoeItem,ShovelItem,ShearsItem,FishingRodItem,FlintAndSteelItem,BrushItem,FoodOnAStickItem. - Matches any item stack with the
DataComponents.TOOLcomponent.
- Any damageable item that does not match the above categories is classified as
OTHERand handled by the Dynamic Modded Item System.
Durability Multiplier is engineered with ❤️ by Dasik (Rifaditya) | Licensed under GNU General Public License v3.0 (GPL-3.0-or-later).
📌 Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.
- 26.2 Hub
- 26.2 Multipliers
- 26.2 God Mode
- 26.2 Damage & Math
- 26.2 Item Classification
- 26.2 Dynamic Registry
- 26.2 Tooltips & HUD
- 26.2 Network Protocol
- 26.2 GameRules Table
- 26.2 Commands & Admin
- 26.2 Advancements
- 26.2 Configuration
- 26.2 ModVersionGuard
- 26.2 Architecture & Mixins
- 26.2 Developer Setup
- 26.2 API & Addons
- 26.2 FAQ & Diagnostics
- 26.1.2 Hub
- 26.1.2 Multipliers
- 26.1.2 God Mode
- 26.1.2 Damage & Math
- 26.1.2 Item Classification
- 26.1.2 Dynamic Registry
- 26.1.2 Tooltips & HUD
- 26.1.2 Network Protocol
- 26.1.2 GameRules Table
- 26.1.2 Commands & Admin
- 26.1.2 Advancements
- 26.1.2 Configuration
- 26.1.2 Architecture & Mixins
- 26.1.2 Developer Setup
- 26.1.2 API & Addons
- 26.1.2 FAQ & Diagnostics