IsleOfBerk DeadlockFix
A tiny Forge 1.18.2 compatibility mod that fixes a server-crash chunk-generation deadlock in the Isle of Berk HTTYD dragon mod by the GACMD team (Ghanou Craft, Apprentice Necromancer, TooTHleZZ & Arsian).
βΉοΈ Isle of Berk itself is officially discontinued β this patch is for servers still running the final isleofberk-1.2.0 jar on 1.18.2 modpacks such as Isle of Berk (Claws of Berk) by kesselot.
If your server has been dying to ServerHangWatchdog with "A single server tick took 60.00 seconds" while IsleOfBerk is installed β this mod fixes it.
π The Problem
During worldgen, SpeedStinger.checkSpawnRules calls ADragonBase.isWaterBelow(), which performs a Level.getBlockState(BlockPos) read against the full ServerLevel. When that read targets a block in a neighbouring chunk that hasn't finished generating yet, the worldgen worker thread blocks inside ServerChunkCache.getChunk(...).join() waiting for a chunk that's waiting for it β a circular deadlock between Worker-Main-N threads.
After 60 seconds, the server watchdog fires and crashes the entire server.
Telltale symptom in your logs:
[Server Watchdog/FATAL]: A single server tick took 60.00 seconds (should be max 0.05)
β¦with a stack landing in ServerChunkCache.getChunk under SpeedStinger.checkSpawnRules β ADragonBase.isWaterBelow.
π§ The Fix
A surgical Mixin (@Inject at HEAD of isWaterBelow()):
- If the calling thread name starts with
Worker-Main (i.e. worldgen), it short-circuits to false and returns immediately β no off-thread block read, no deadlock.
- Worldgen spawn checks are the only off-main caller of this method, so the short-circuit only affects spawn-placement decisions during chunk generation (SpeedStingers still spawn fine; they just skip their water check during worldgen).
- All live AI uses (
DragonSleepGoal, AIDragonLand, etc.) run on the main Server thread and are completely unaffected β dragon behaviour is identical.
- Uses
@Pseudo so it loads cleanly even if IsleOfBerk is missing or refmap generation can't see the target class.
β
Compatibility
| Spec |
Value |
| Minecraft |
1.18.2 |
| Forge |
40.x+ |
| Loader |
Forge (FML) |
| Side |
Both (server-side fix; client copy is harmless) |
| Required mod |
isleofberk β₯ 1.2.0 |
This mod only patches IsleOfBerk β zero interaction with other mods, safe to drop into any 1.18.2 modpack that includes IsleOfBerk (e.g. Claws of Berk).
π¦ Installation
Drop isleofberk-deadlockfix-1.0.0.jar into mods/ alongside isleofberk-1.2.0.jar.
Start the server. Confirm in the log:
[IoB-DeadlockFix] Loaded. Mixin will short-circuit ADragonBase.isWaterBelow() during off-main-thread worldgen.
Enjoy a server that doesn't crash during chunk generation. π
π License & Source