File Details
death_detangler-1.2.1.jar
- R
- Feb 3, 2026
- 73.06 KB
- 512
- 1.20.1
- Forge
File Name
death_detangler-1.2.1.jar
Supported Versions
- 1.20.1
Curse Maven Snippet
Death Detangler 1.2.1
Critical Fixes
Fixed Server Crash on Entity Death
- **CRITICAL FIX**: Fixed crash on dedicated servers when entities die
- The mod was attempting to access `LocalPlayer` class (client-only) on the server thread during `onLivingDeath` event
- Error: `java.lang.RuntimeException: Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER`
- **Solution**: Added proper client-side check using reflection before accessing `LocalPlayer` class
- The mod now safely handles client-side player cleanup only when running on the client, preventing server crashes
- This fix ensures the mod works correctly on dedicated servers, not just in single-player/LAN mode
## Technical Details
- **Client-Side Detection**: Now uses `entity.level().isClientSide()` check before attempting to access `LocalPlayer`
- **Reflection-Based Safety**: Uses `Class.forName()` with proper exception handling to avoid loading client-only classes on the server
- **Server Compatibility**: The mod now properly distinguishes between server-side (`ServerPlayer`) and client-side (`LocalPlayer`) entities

