Explosion Parallelization
ModA mod that parallelizes explosion calculations across multiple CPU
Type
Mod
Modrinth Downloads
120
Modrinth ID
2yAIA2XW
Last Updated
Jun 18, 2026
Description
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 resultsAll 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.8Recommendation: 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 fileConfiguration
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 pathsBehavior-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.
Compatibility
Mod Loaders
Game Versions
Similar Mods
The Moon
Adds a new Moon dimension, containing lots of gold, a new advancement, a way to travel to and from it and more cool feat...
Curios/Trinkets Media Holder
An addon of HexCasting, making media holder items able to go inside Curios/Trinket slots.
Crystal's Additions
Crystal's Addition is a mod that transforms Minecraft into an adventure-RPG with a character progression system. It also...
Kade's Tweaks
An assortment of items and mechanics that are added into the game to make things more interesting.
The Ghoul Remastered
Get yourself some good equipment for fighting the new "Ghoul" but this is not all, because after this battle you have a...
Monday Night Minin'
A Friday Night Funkin' inspired rhythm versus mod