Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
Explosion Parallelization
Say goodbye to explosion lag on your server.
Explosion Parallelization rewires Minecraft's explosion engine to run on multiple CPU cores simultaneously. Where vanilla processes every explosion ray and entity damage one-by-one on the main thread, this mod divides the work across your server's available cores, cutting explosion overhead by 60-70%.
The Problem
Vanilla explosions are entirely single-threaded. A single TNT detonation traces 1,352 rays through the world, each checking up to 30 blocks for blast resistance — that's ~40,000 block lookups. Now multiply that by a 5×5×5 TNT cube (125 TNT blocks detonating simultaneously), and the main thread simply can't keep up. Result: your server's TPS tanks, and everyone lags.
The Solution
Explosion Parallelization splits the explosion pipeline into two parallel phases on a ForkJoinPool-backed thread pool:
| Phase | Work | Parallelization |
|---|---|---|
| Ray Tracing | 1,352 rays × ~30 steps each | Split evenly across worker threads; results collected into a dense boolean grid — lock-free, no merge overhead |
| Entity Damage | Exposure checks, damage calculation, knockback vectors | Workers compute read-only; main thread applies results |
All else — block drops, fire placement — stays on the main thread, with proper synchronization to prevent world corruption. Chunk access from worker threads bypasses the main-thread dispatch queue via ChunkSafeAccessor, avoiding deadlocks.
Performance
Benchmarked with a 5×5×5 TNT cube detonation (spark profiler, 1-minute recording):
| Setup | MSPT (95th %ile) |
|---|---|
| Vanilla | ~277 |
| This mod | ~74.5 |
| Lithium alone | ~130 |
| This mod + Lithium | ~37.8 |
Recommendation: Use together with Lithium — this mod parallelizes explosion calculation, Lithium optimizes entity collision checks; they complement each other perfectly.
Features
- Vanilla-identical by default — With all settings at their defaults, explosion behavior matches vanilla exactly
- Adaptive Ray Grid — Reduce explosion rays from 1,352 down to as few as 296 for faster processing (
adaptiveRays) - Adjustable Entity Sampling — Tune entity visibility sampling density: Accurate (vanilla ~45 samples/entity), Fast (~24), Aggressive (~12)
- Ray Lookup Acceleration — Pre-computed O(1) direction→distance lookup table, trading minor angular accuracy for massive speedup in entity exposure checks
- Precise Ray Toggle — Choose between vanilla float-accumulation ray stepping (accurate) or precomputed integer-delta stepping (faster, tiny deviation)
- Live Toggle — Enable, disable, or reconfigure on the fly with in-game commands — no restart needed
- Thread-safe by design — Deterministic results: all random factors are pre-generated on the main thread so explosion patterns remain consistent
Commands
(Requires OP level 2 / Gamemaster)
/parallel explosion Show current status
/parallel explosion true|false Toggle parallel explosions
/parallel explosion sampling accurate|fast|aggressive Set entity sampling quality
/parallel explosion raylookup true|false Toggle ray lookup acceleration
/parallel explosion adaptiveRays <0..16> Set adaptive ray grid size
/parallel explosion preciseRays true|false Toggle precise ray tracing
/parallel explosion reload Reload config from file
Configuration
All settings are stored in config/explosion-parallelization.json and can be changed in-game or by editing the file directly:
| Setting | Default | Description |
|---|---|---|
enabled |
true |
Master switch |
samplingFactor |
2.0 |
Entity visibility sampling density (2.0=accurate, 1.0=fast, 0.5=aggressive) |
rayLookup |
false |
Enable fast O(1) ray distance lookup table |
adaptiveRays |
0 |
Ray grid coarseness (0=vanilla 1352 rays, 8=fast ~296 rays) |
preciseRays |
true |
Use vanilla float-accumulation ray stepping; disable for faster integer-delta paths |
Behavior-Changing Options
Default config preserves vanilla behavior exactly. The following options intentionally deviate:
samplingFactor < 2.0
Reduces the number of ray samples per entity for getSeenPercent. Fewer samples = less accurate knockback in edge cases, but significantly faster.
rayLookup = true
Replaces per-sample DDA traversal with a pre-computed direction→distance lookup from the explosion's 1,352 rays. ~5.5° angular resolution means partially-occluded entities at long range may see up to 10-15% deviation.
adaptiveRays > 0
Reduces explosion ray grid resolution. Fewer rays = coarser explosion shape but better performance.
preciseRays = false
Switches from float-accumulation ray stepping (vanilla) to precomputed integer-delta paths. Slightly different block traversal near block corners; imperceptible in most scenarios. Best paired with other acceleration options for maximum throughput.
Dependencies
Server-side only — clients do not need to install this mod.


