-
Notifications
You must be signed in to change notification settings - Fork 0
26.2 ModVersionGuard and Safety
| Parameter | Value |
|---|---|
| Guard Class | net.instantgratification.durabilitymultiplier.util.ModVersionGuard |
| Invocation | DurabilityMultiplierFabric.onInitialize() |
| Checked Class |
net.minecraft.world.entity.EntityTypes (MC 26.2+ indicator) |
| ClassLoader |
Thread.currentThread().getContextClassLoader() (Knot ClassLoader) |
| Purpose | Prevent world corruption if loaded into incompatible runtime |
Minecraft drops in the Modern Sovereign era undergo rapid API evolutions. If a mod compiled for MC 26.2 is mistakenly run on an older or incompatible runtime, silent classloading errors can result in broken item data or corrupted world saves.
ModVersionGuard executes a zero-dependency pre-check during onInitialize() before any GameRules, mixins, or configs are initialized:
ModVersionGuard.checkClass("Durability Multiplier", "net.minecraft.world.entity.EntityTypes");If the required class is missing from the Knot ClassLoader, the game immediately halts with an informative crash banner:
=====================================================================
[PRE-RELEASE / VERSION GUARD WARNING] Durability Multiplier
---------------------------------------------------------------------
CRITICAL: Incompatible Minecraft Game Runtime or Missing Class!
Required Class : net.minecraft.world.entity.EntityTypes
Status : UNRESOLVED AT RUNTIME
Safety Protection:
Execution halted to prevent unreleased/incompatible build deployment
or broken world state save corruption.
Troubleshooting Steps:
1. Verify target Minecraft version (26.2+ release drop).
2. Ensure all required dependencies (Fabric API, DasikLibrary) are loaded.
3. Build/Download a verified matching release JAR from Modrinth/CurseForge.
=====================================================================
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