mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Fixed a non-existant configuration packet from crashing the client.
This commit is contained in:
parent
0e15806722
commit
5a5165e89f
1 changed files with 13 additions and 1 deletions
|
|
@ -467,7 +467,19 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
// https://wiki.vg/Protocol#Configuration
|
||||
case CurrentState.Configuration:
|
||||
switch (packetPalette.GetIncomingConfigurationTypeById(packetId))
|
||||
if (!packetPalette.GetMappingInConfiguration().TryGetValue(packetId, out var configurationPacketType))
|
||||
{
|
||||
if (packetPalette.GetMappingIn().ContainsKey(packetId))
|
||||
{
|
||||
currentState = CurrentState.Play;
|
||||
return HandlePlayPackets(packetId, packetData);
|
||||
}
|
||||
|
||||
throw new KeyNotFoundException("Configuration Packet ID of 0x" + packetId.ToString("X2") +
|
||||
" doesn't exist!");
|
||||
}
|
||||
|
||||
switch (configurationPacketType)
|
||||
{
|
||||
case ConfigurationPacketTypesIn.CookieRequest:
|
||||
var cookieName = dataTypes.ReadNextString(packetData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue