Connection problemsNetHandlerLoginClient Cannot Be Cast to NetHandlerPlayClient
What it looks like in the log
java.lang.ClassCastException: Cannot cast net.minecraft.client.network.NetHandlerLoginClient to net.minecraft.client.network.NetHandlerPlayClient
How to fix it
- Update Minecraft Forge to the latest build available for your Minecraft version (especially on 1.7.2 and 1.12, where official patches fixed Netty handshake race conditions).
- Try joining the world or server again, since thread timing race conditions during the Forge handshake often succeed on a retry.
- Inspect the stack trace lines immediately below the ClassCastException for any mod package names; if a specific mod is sending packets during login, update or remove that mod.
- If this occurs in a Forge development environment, verify that all blocks and items are registered during the proper initialization phase and avoid manually overriding the client NetHandler or sending play packets before login finishes.
| Loaders | Forge |
|---|
| Severity | Breaks something |
|---|
| Category | Connection problems |
|---|
Check your own log