Hello, I have a reproducible server freeze related to dungeon_difficulty.
Environment: Fabric 1.20.1, ~450 mods, multiplayer server (30–40 players).
Problem
- When any player approaches chunk region (-180,64) to (-162,68) the server completely freezes and disconnects clients with a timeout.
- Deleting entities and tile entities in these chunks with MCA Selector does not solve the issue.
- Even deleting and regenerating the chunks still reproduces the problem.
Diagnostics
-
Running /spark profiler --timeout 60 during the freeze shows the main thread blocked in dungeon_difficulty logic.
-
The stacktrace points to structure pattern matching: calls into net.minecraft.server.level.ServerChunkCache / ChunkMap and dungeon_difficulty structure scanning.
-
Example excerpt from the captured stack:
java.lang.Thread.run
net.minecraft.server.MinecraftServer.tickChildren
net.minecraft.server.level.ServerChunkCache.getChunk
net.minecraft.server.level.ChunkMap.getChunk
net.minecraft.world.level.chunk.ChunkStatus.generate
modernfix.structure.CachingStructureManager.readStructureTag
dungeon_difficulty.structure.StructureDifficultyHandler.matchStructures
dungeon_difficulty.structure.StructureDifficultyHandler.updateChunkDifficulty
-
Disabling the mod dungeon_difficulty immediately resolves the freeze; the region becomes playable again.
-
Other structure mods present (BetterDungeons, BetterMineshafts, BetterStrongholds, RespawningStructures, etc.), but only dungeon_difficulty consistently triggers the lockup.
Config
Even with a stock config (dungeon_difficulty_v2.json), the issue persists. Customizing values (perPlayerDifficulty, entity matchers, zones) does not change behavior — the server still freezes as soon as dungeon_difficulty is active.
Expected
Dungeon Difficulty should not hard-freeze the server during chunk load. At worst, it should skip invalid or unexpected structure data.
Request
Could you please investigate:
- Why structure scanning in
dungeon_difficulty hangs indefinitely in certain regions?
- Is there a way to disable structure-based difficulty logic entirely, and only use per-dimension or per-player scaling?
- Could the structure matcher run asynchronously or with a timeout, so it cannot lock up the main server thread?
Thanks for your work — this mod is very useful for RPG balancing, but this bug makes some areas of the world completely unplayable.
Hello, I have a reproducible server freeze related to dungeon_difficulty.
Environment: Fabric 1.20.1, ~450 mods, multiplayer server (30–40 players).
Problem
Diagnostics
Running
/spark profiler --timeout 60during the freeze shows the main thread blocked indungeon_difficultylogic.The stacktrace points to structure pattern matching: calls into
net.minecraft.server.level.ServerChunkCache / ChunkMapanddungeon_difficultystructure scanning.Example excerpt from the captured stack:
Disabling the mod
dungeon_difficultyimmediately resolves the freeze; the region becomes playable again.Other structure mods present (BetterDungeons, BetterMineshafts, BetterStrongholds, RespawningStructures, etc.), but only dungeon_difficulty consistently triggers the lockup.
Config
Even with a stock config (
dungeon_difficulty_v2.json), the issue persists. Customizing values (perPlayerDifficulty, entity matchers, zones) does not change behavior — the server still freezes as soon as dungeon_difficulty is active.Expected
Dungeon Difficulty should not hard-freeze the server during chunk load. At worst, it should skip invalid or unexpected structure data.
Request
Could you please investigate:
dungeon_difficultyhangs indefinitely in certain regions?Thanks for your work — this mod is very useful for RPG balancing, but this bug makes some areas of the world completely unplayable.