MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.57k stars 379 forks source link

[BUG] Joining a 1.21 server works but get kicked immediately #2749

Open BurkenDev opened 3 weeks ago

BurkenDev commented 3 weeks ago

Prerequisites

Minecraft Version

1.20.6 / 1.20.4 / 1.21

Console Client Version

Latest

Expected Behavior

Be able to join the server

Actual Behavior

Joining a server works but get kicked immediately

Steps to Reproduce the bug

Join a 1.21 server which also runs the latest version of ViaVersion should work with an older client like this.

Attach screenshot here (If applicable)

Connecting to Microsoft... Using Minecraft version 1.20 (protocol v763) Cached profile key needs to be refreshed. Fetching profile key from Microsoft. [MCC] Version is supported. Logging in... [MCC] Checking Session... [MCC] Server was successfully joined. Type '/quit' to leave the server. ▌ has joined the network. (smp4)

Unhandled exception. System.IO.InvalidDataException: Failed to process incoming packet of type JoinGame. (PacketID: 40, Protocol: 763, LoginPhase: False, InnerException: System.Collections.Generic.KeyNotFoundException). ---> System.Collections.Generic.KeyNotFoundException: The given key 'minecraft:chat_type' was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at MinecraftClient.Protocol.Message.ChatParser.ReadChatType(Dictionary2 registryCodec) at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePlayPackets(Int32 packetId, Queue1 packetData) at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue1 packetData) --- End of inner exception stack trace --- at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) at MinecraftClient.Protocol.Handlers.Protocol18Handler.Updater(Object o) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) Aborted

Anythings that could help diagnosing the bug

No response

Device

Other

Operating System

Linux

Server Address (If applicable)

No response

milutinke commented 3 weeks ago

Join our discord, refer to this message on how to fix this: https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

Xitee1 commented 3 weeks ago

How are you able to connect to 1.21 servers in the first place? I'm always getting the message "This version is not supported!" (built by myself from lastest master branch).

C0j23T commented 2 weeks ago

I tried Minecraft 1.18 and it worked. The server runs ViaVersion and ViaBackwards.

Server version : Velocity 1.7.2-1.21 (protocol v767)
Cannot connect to the server : This version is not supported !
Server version :
Restarting Minecraft Console Client...
Settings have been loaded from MinecraftClient.ini
You chose to run in offline mode.
Using Minecraft version 1.18 (protocol v757)
[MCC] Version is supported.
Logging in...
[MCC] Server is in offline mode.
[MCC] Server was successfully joined.
Type '/quit' to leave the server.
fakeplayer1 joined the game
Xitee1 commented 2 weeks ago

The server needs to add ViaVersion and ViaBackwards

Ok, I thought there already is support for 1.21. Using ViaBackwards and version 1.19 I can join the server. A bit overkill for my server having to install 3 additional plugins (+ViaVersionStatus for unaware players) but at least it works and I can AFK at my farms again.

theabab2333 commented 2 weeks ago

加入我们的 discord,请参阅此消息以了解如何解决此问题:https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

I can't join the discord because the invitation in GitHub is no longer valid and can't get help

milutinke commented 2 weeks ago

加入我们的 discord,请参阅此消息以了解如何解决此问题:https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

I can't join the discord because the invitation in GitHub is no longer valid and can't get help

https://discord.gg/HGeUZhF2

theabab2333 commented 2 weeks ago

加入我们的 discord,请参阅此消息以了解如何解决此问题:https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

I can't join the discord because the invitation in GitHub is no longer valid and can't get help

https://discord.gg/HGeUZhF2

thanks