Every time you travel between the Overworld, Nether, and End, your client creates a new ClientWorld. The old world should be garbage-collected, but several popular mods accidentally hold references to it - causing it to stay in memory forever.
After just a few dimension changes, this can eat 4-8 GB of RAM, leading to lag spikes, stuttering, and eventually crashes.
Dimension Leak Fix automatically detects dimension transitions and surgically breaks these retention chains, recovering 2-4 GB of memory per transition.
What it fixes
| Source | Problem | Impact |
|---|---|---|
| Entity references | Entities in the old world hold a .level field pointing back to it |
~200 MB per transition |
| Collective | BlockEntityData.cachedBlockEntities retains old worlds through nested WeakHashMaps |
~1.2 GB per transition |
| AmbientSounds | AirPocketScanner thread holds thousands of ChunkSections as a GC root | ~1.4 GB per transition |
| Create | Renderer caches hold references to old world data | Variable |
| Chunk storage | Old world's ChunkManager retains all loaded chunks in memory | ~1-3 GB per transition |
How it works
The mod uses a two-phase approach:
- Phase A (instant): When you change dimension, the mod immediately detaches entity references, flushes Collective caches, stops the AmbientSounds scanner thread, detaches Spark command senders, and invalidates Create's renderer.
- Phase B (3 seconds later): The mod clears the old world's chunk storage array and entity sets. This is delayed to avoid interfering with the renderer during the transition.
Compatibility
- Client-side only - does not need to be installed on the server
- Works with or without any of the mods listed above - the mod detects what's installed and only applies relevant fixes
- Tested with 200+ mods including Iris, Sodium, Distant Horizons, Create, Collective, AmbientSounds
Log output
The mod logs everything it does. Example output after a dimension change:
[DimensionLeakFix] Dimension change detected, cleaning up old world...
[DimensionLeakFix] Entities: 131 world references detached
[DimensionLeakFix] Collective: 1 cache(s) flushed in cachedBlockEntities
[DimensionLeakFix] AmbientSounds: scanner stopped (3 fields cleared)
[DimensionLeakFix] Create: renderer cache invalidated
[DimensionLeakFix] Phase A complete (137 operations)
[DimensionLeakFix] Phase B scheduled (3s delay)
[DimensionLeakFix] Phase B: releasing old world data...
[DimensionLeakFix] Chunks: 2809 slots released
[DimensionLeakFix] loadedChunks: 2809 entries cleared
[DimensionLeakFix] Phase B complete (2810 references released, ~3706 MB freed)
Used in the Legends Reborn: Medieval modpack.
No gallery available for this project.
| Version | Minecraft | Loader | Download |
|---|---|---|---|
|
dimension-leak-fix-mc26.2-fabric-1.0.2.jar 1.0.2+26.2 |
26.2
|
fabric
|
Download |
|
dimension-leak-fix-mc26.1.2-fabric-1.0.2.jar 1.0.2+26.1.2 |
26.1.2
|
fabric
|
Download |
|
dimension-leak-fix-mc26.1.1-fabric-1.0.2.jar 1.0.2+26.1.1 |
26.1.1
|
fabric
|
Download |
|
dimension-leak-fix-mc26.1-fabric-1.0.2.jar 1.0.2+26.1 |
26.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.11-fabric-1.0.2.jar 1.0.2+1.21.11 |
1.21.11
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.10-fabric-1.0.2.jar 1.0.2+1.21.10 |
1.21.10
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.9-fabric-1.0.2.jar 1.0.2+1.21.9 |
1.21.9
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.8-fabric-1.0.2.jar 1.0.2+1.21.8 |
1.21.8
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.7-fabric-1.0.2.jar 1.0.2+1.21.7 |
1.21.7
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.6-fabric-1.0.2.jar 1.0.2+1.21.6 |
1.21.6
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.5-fabric-1.0.2.jar 1.0.2+1.21.5 |
1.21.5
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.4-fabric-1.0.2.jar 1.0.2+1.21.4 |
1.21.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.3-fabric-1.0.2.jar 1.0.2+1.21.3 |
1.21.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.2-fabric-1.0.2.jar 1.0.2+1.21.2 |
1.21.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.1-fabric-1.0.2.jar 1.0.2+1.21.1 |
1.21.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21-fabric-1.0.2.jar 1.0.2+1.21 |
1.21
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.6-fabric-1.0.2.jar 1.0.2+1.20.6 |
1.20.6
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.5-fabric-1.0.2.jar 1.0.2+1.20.5 |
1.20.5
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.4-fabric-1.0.2.jar 1.0.2+1.20.4 |
1.20.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.3-fabric-1.0.2.jar 1.0.2+1.20.3 |
1.20.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.2-fabric-1.0.2.jar 1.0.2+1.20.2 |
1.20.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.1-fabric-1.0.2.jar 1.0.2+1.20.1 |
1.20.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20-fabric-1.0.2.jar 1.0.2+1.20 |
1.20
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.4-fabric-1.0.2.jar 1.0.2+1.19.4 |
1.19.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.3-fabric-1.0.2.jar 1.0.2+1.19.3 |
1.19.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.2-fabric-1.0.2.jar 1.0.2+1.19.2 |
1.19.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.1-fabric-1.0.2.jar 1.0.2+1.19.1 |
1.19.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19-fabric-1.0.2.jar 1.0.2+1.19 |
1.19
|
fabric
|
Download |
|
dimension-leak-fix-mc1.18.2-fabric-1.0.2.jar 1.0.2+1.18.2 |
1.18.2
|
fabric
|
Download |
|
dimension-leak-fix-mc26.2-fabric-1.0.1.jar 1.0.1+26.2 |
26.2
|
fabric
|
Download |
|
dimension-leak-fix-mc26.1.2-fabric-1.0.1.jar 1.0.1+26.1.2 |
26.1.2
|
fabric
|
Download |
|
dimension-leak-fix-mc26.1.1-fabric-1.0.1.jar 1.0.1+26.1.1 |
26.1.1
|
fabric
|
Download |
|
dimension-leak-fix-mc26.1-fabric-1.0.1.jar 1.0.1+26.1 |
26.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.11-fabric-1.0.1.jar 1.0.1+1.21.11 |
1.21.11
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.10-fabric-1.0.1.jar 1.0.1+1.21.10 |
1.21.10
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.9-fabric-1.0.1.jar 1.0.1+1.21.9 |
1.21.9
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.8-fabric-1.0.1.jar 1.0.1+1.21.8 |
1.21.8
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.7-fabric-1.0.1.jar 1.0.1+1.21.7 |
1.21.7
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.6-fabric-1.0.1.jar 1.0.1+1.21.6 |
1.21.6
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.5-fabric-1.0.1.jar 1.0.1+1.21.5 |
1.21.5
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.4-fabric-1.0.1.jar 1.0.1+1.21.4 |
1.21.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.3-fabric-1.0.1.jar 1.0.1+1.21.3 |
1.21.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.2-fabric-1.0.1.jar 1.0.1+1.21.2 |
1.21.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.1-fabric-1.0.1.jar 1.0.1+1.21.1 |
1.21.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21-fabric-1.0.1.jar 1.0.1+1.21 |
1.21
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.6-fabric-1.0.1.jar 1.0.1+1.20.6 |
1.20.6
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.5-fabric-1.0.1.jar 1.0.1+1.20.5 |
1.20.5
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.4-fabric-1.0.1.jar 1.0.1+1.20.4 |
1.20.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.3-fabric-1.0.1.jar 1.0.1+1.20.3 |
1.20.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.2-fabric-1.0.1.jar 1.0.1+1.20.2 |
1.20.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.1-fabric-1.0.1.jar 1.0.1+1.20.1 |
1.20.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20-fabric-1.0.1.jar 1.0.1+1.20 |
1.20
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.4-fabric-1.0.1.jar 1.0.1+1.19.4 |
1.19.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.3-fabric-1.0.1.jar 1.0.1+1.19.3 |
1.19.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.2-fabric-1.0.1.jar 1.0.1+1.19.2 |
1.19.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.1-fabric-1.0.1.jar 1.0.1+1.19.1 |
1.19.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19-fabric-1.0.1.jar 1.0.1+1.19 |
1.19
|
fabric
|
Download |
|
dimension-leak-fix-mc1.18.2-fabric-1.0.1.jar 1.0.1+1.18.2 |
1.18.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.4-fabric-1.0.0 1.0.0+1.20.4 |
1.20.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.3-fabric-1.0.0 1.0.0+1.20.3 |
1.20.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.2-fabric-1.0.0 1.0.0+1.20.2 |
1.20.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.1-fabric-1.0.0 1.0.0+1.20.1 |
1.20.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20-fabric-1.0.0 1.0.0+1.20 |
1.20
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.4-fabric-1.0.0 1.0.0+1.19.4 |
1.19.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.3-fabric-1.0.0 1.0.0+1.19.3 |
1.19.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.2-fabric-1.0.0 1.0.0+1.19.2 |
1.19.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19.1-fabric-1.0.0 1.0.0+1.19.1 |
1.19.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.19-fabric-1.0.0 1.0.0+1.19 |
1.19
|
fabric
|
Download |
|
dimension-leak-fix-mc1.18.2-fabric-1.0.0 1.0.0+1.18.2 |
1.18.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.11-fabric-1.0.0 1.0.0+1.21.11 |
1.21.11
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.10-fabric-1.0.0 1.0.0+1.21.10 |
1.21.10
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.9-fabric-1.0.0 1.0.0+1.21.9 |
1.21.9
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.8-fabric-1.0.0 1.0.0+1.21.8 |
1.21.8
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.7-fabric-1.0.0 1.0.0+1.21.7 |
1.21.7
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.6-fabric-1.0.0 1.0.0+1.21.6 |
1.21.6
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.5-fabric-1.0.0 1.0.0+1.21.5 |
1.21.5
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.4-fabric-1.0.0 1.0.0+1.21.4 |
1.21.4
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.3-fabric-1.0.0 1.0.0+1.21.3 |
1.21.3
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.2-fabric-1.0.0 1.0.0+1.21.2 |
1.21.2
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21.1-fabric-1.0.0 1.0.0+1.21.1 |
1.21.1
|
fabric
|
Download |
|
dimension-leak-fix-mc1.21-fabric-1.0.0 1.0.0+1.21 |
1.21
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.6-fabric-1.0.0 1.0.0+1.20.6 |
1.20.6
|
fabric
|
Download |
|
dimension-leak-fix-mc1.20.5-fabric-1.0.0 1.0.0+1.20.5 |
1.20.5
|
fabric
|
Download |