fangorn/huorn-minecraft
public
ref:e55101dfc46e9306b97cca931247b177c46d6440
Fix freeze/crash on block break: async terminal close, no cascade rescan
Freeze fix: NativeTerminal.close() now runs nativeDestroy() on a daemon
background thread. The PTY child process can take time to die (SIGHUP
handling), and blocking the game thread froze the entire game.
Crash fix: onBlockRemoved no longer cascades rescanGroup() to all
neighbors synchronously. Instead, it clears stale group refs and
resets the lazy scan timer — neighbors will rescan on their next
client tick. This avoids crashes from world state being inconsistent
during block breaking.
onPlace also simplified: only rescans the newly placed block, not
all 6 neighbors. Neighbors pick up changes via lazy client tick.
All operations wrapped in try-catch to prevent any exception during
group management from crashing the game.
46 GameTests + 52 Rust tests, all passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SHA:
e55101dfc46e9306b97cca931247b177c46d6440
Author:
Cole Christensen <cole.christensen@macmillan.com>
Date:
2026-03-20 14:51
Parents:
692aaa6
5 files changed
+75
-39
| Type | ||
|---|---|---|
|
|
common/src/main/java/io/fangorn/alacrittymc/block/TerminalBlock.java | +9 −24 |
|
||
|
|
common/src/main/java/io/fangorn/alacrittymc/block/TerminalBlockEntity.java | +24 −10 |
|
||