-
Notifications
You must be signed in to change notification settings - Fork 0
26.2 API and Addon Integration
Dasik (Rifaditya) edited this page Aug 21, 2026
·
1 revision
| Integration Facade | Package / Location |
|---|---|
| Core Helper | net.instantgratification.durabilitymultiplier.DurabilityHelper |
| GameRule Registry | net.instantgratification.durabilitymultiplier.registry.DurabilityRules |
| Client State | net.instantgratification.durabilitymultiplier.network.DurabilityClientState |
| Dynamic Rules | net.dasik.social.api.gamerule.DynamicGameRuleManager |
Other Fabric mods can inspect the active durability modifier for any item stack:
// Server-Side: Query effective multiplier for an ItemStack
int multiplier = DurabilityHelper.getEffectiveMultiplier(serverLevel, itemStack);
// Server-Side: Check if an item is currently unbreakable (God Mode)
boolean isGodMode = DurabilityHelper.isInfinite(serverLevel, itemStack);
// Client-Side: Query synced client state
int clientMultiplier = DurabilityHelper.getEffectiveMultiplierClient(itemStack);
boolean clientGodMode = DurabilityHelper.isInfiniteClient(itemStack);Addon mods can register custom rules into the DURABILITY_MULTIPLIER category using DynamicGameRuleManager:
GameRule<Integer> customRule = DynamicGameRuleManager.integerRule(
"ig:custom_wand_multiplier",
DurabilityRules.DURABILITY_MULTIPLIER,
2
).name("Custom Wand Multiplier").min(1).register();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