mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add more debug info in packet parsing errors
For diagnosing #710 and other future packet parsing errors
This commit is contained in:
parent
c04b17cabc
commit
9841156130
1 changed files with 454 additions and 440 deletions
|
|
@ -401,6 +401,8 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
/// <param name="packetData">Packet contents</param>
|
/// <param name="packetData">Packet contents</param>
|
||||||
/// <returns>TRUE if the packet was processed, FALSE if ignored or unknown</returns>
|
/// <returns>TRUE if the packet was processed, FALSE if ignored or unknown</returns>
|
||||||
private bool handlePacket(int packetID, List<byte> packetData)
|
private bool handlePacket(int packetID, List<byte> packetData)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (login_phase)
|
if (login_phase)
|
||||||
{
|
{
|
||||||
|
|
@ -854,6 +856,18 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
}
|
}
|
||||||
return true; //Packet processed
|
return true; //Packet processed
|
||||||
}
|
}
|
||||||
|
catch (Exception innerException)
|
||||||
|
{
|
||||||
|
throw new System.IO.InvalidDataException(
|
||||||
|
String.Format("Failed to process incoming packet of type {0}. (PacketID: {1}, Protocol: {2}, LoginPhase: {3}, InnerException: {4}).",
|
||||||
|
getPacketIncomingType(packetID, protocolversion),
|
||||||
|
packetID,
|
||||||
|
protocolversion,
|
||||||
|
login_phase,
|
||||||
|
innerException.GetType()),
|
||||||
|
innerException);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Process chunk column data from the server and (un)load the chunk from the Minecraft world
|
/// Process chunk column data from the server and (un)load the chunk from the Minecraft world
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue