I recently decided to try the re-configuration packet that triggers the configuration phase from the game protocol (added in 1.20.2). However, I encountered an issue where the players are kicked when switching to the configuration phase.
Background
I have a Minecraft: Java Edition server where I am creating a minigame using the Fabric mod loader. At some point in the game, I want to load a datapack which adds new dynamic content, such as dimension types or biomes.
The datapack should be loaded dynamically, as it is only needed for a specific map of the game. Meaning the datapack is not initiallly loaded on the server.
I tried to trigger re-configuration using the /debugconfig config @s
command. However the underlying behaviour seems to be broken, as the player is kicked (1.20.4).
[1.20.4]
The following error message in printed to the server log:
[Server thread/INFO] (Minecraft) LCLP left the game
[Server thread/INFO] (Minecraft) LCLP lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet
[Server thread/INFO] (Minecraft) LCLP left the game
[24w14a]
I tried the same in the currently latest snapshot. Here, the player is not kicked with an error message, but is stuck indefinitely in the "Reconfiguring" screen. In the server console, I observed two errors with the message:
[Netty Server IO #1/ERROR] (Minecraft) Error sending packet clientbound/minecraft:system_chat
Conclusion
I uploaded the server-side network logs for both versions.
As you can see, in both versions, the minecraft:system_chat packet is sent after the minecraft:start_configuration packet. The minecraft:system_chat packet is not registered in in the configuration phase, thus throwing an error.
The message sent seems to be the "<player> left the game" message, sent in ServerGamePacketListenerImpl::removePlayerFromWorld
, which is called by ServerGamePacketListenerImpl::switchToConfig
.
I created a small Fabric mod that fixes this error: https://github.com/LCLPYT/mc-reconfigure-bug
My guess is that in 24w14a, the reconfiguration would actually work, if the configuration packets are sent manually. The indefinite loading occurs, as by default, the finishing packet is not sent. But the error is printed nonetheless.
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)?
This ticket will automatically reopen when you reply.