Description
Don’t Crash Tom (NeoForge 1.21.1)
A micro patch for Tom’s Simple Storage that stops a rare but annoying crash from BlockCapabilityCache when chunks unload, dimensions change (portals), or capability caches are invalidated.
What it fixes
- Tom’s Simple Storage PlatformInventoryAccess.BlockInventoryAccess calls itemCache.getCapability() even after the cache is invalid.
- When the cache is dead, NeoForge throws an
IllegalStateException, crashing or kicking the server/client. - This mod intercepts tracker() and exists() and bails out if the cache is null/invalid instead of touching the dead cache.
Scope
- Stability-only. No gameplay, balance, loot, GUIs, or configs.
- Safe to add to existing worlds; remove anytime once upstream includes the fix.
- Tiny footprint: just a mixin that guards the capability lookup.
Requirements
- Loader: NeoForge 21.1.x
- Game: Minecraft 1.21.1
- Target mod: Tom’s Simple Storage (tested with 1.21-2.2.3). Other minor versions likely fine as long as the same BlockInventoryAccess class/methods exist.
Compatibility
- No worldgen, no items/blocks, no mixins beyond Tom’s Simple Storage PlatformInventoryAccess.BlockInventoryAccess.
- Should coexist with other storage/network mods and general optimization mods.
How to tell it worked
- The specific BlockCapabilityCache crash on chunk unload/portal travel no longer occurs.
- Log line on load: “DontCrashTom loaded - Tom’s Storage BlockCapabilityCache fix active”.
- Occasional debug log when it prevents an invalid cache access (can be ignored).
Why you’d want this
- Prevents unexpected crashes on busy servers where chunks unload/reload frequently or players portal around.
- Zero configuration, zero gameplay impact; pure stability patch.
License / Credit
- License: All Rights Reserved (matches upstream policy of the source assets).
- Author: Navrelis


