- Loading singleplayer world can sometimes crash the game (potentially related to use of Mojang account) - MC-250974
- Goat horn appears everywhere in Creative inventory - MC-250926
- Player gets assigned a new UUID in singleplayer, causing skins, previously saved advancements, etc to not load - MC-250954
Chat is completely re-written. Here is how this works:
- Client requests Public/Private key pair from Mojang's server on startup.
- Client, when joining the server, sends the Mojang-private-key-signed public key; if this is missing or invalid and the server enforces secure profile using
enforce-secure-profile
server.properties
value, players will be kicked. - During the key exchange, client previously encrypted a nonce using the server's public key which the server tried to verify by decrypting and comparing; while this is still the case for those without the public key, those with public key will now perform the nonce verification by client signing the nonce and server verifying it.
- Client, when sending a chat message, will now send the
Instant
the message was sent at, and the RSA/SHA-1 signature composed of nonce, the player UUID, the instant, and the UTF-8 encoded message. - The instant value is used as part of the signed message timestamp, but also to discard messages that were delivered too late - 2 minutes in vanilla.
- The server-side processing (including the filter) has mostly stayed the same.
- There are new packets for S2C chat messages; "packets" (plural) - one that works like the previous
GameMessageS2CPacket
and is used for system messages (death, join, leave) and commands (/tellraw
,/say
, etc), and one for player chat messages. With this the methods for sending/broadcasting chat messages have also been changed. - Methods in
PlayerManager
andServerPlayerEntity
that sent chat messages were split into one for game message and one for chat message. The one takingChatSender
, the timestamp, andNetworkEncryptionUtils.SignatureData
(from the packet) is the one for chat messages. - There is a new class,
ChatSender
, that holds the sender's UUID and username and is part of the chat message packet. You'll usually obtain this by callingplayer.asChatSender()
. - If you want to send an unsigned chat message, you can use
NetworkEncryptionUtils.SignatureData#field_39040
. Obviously this marks the message as unverifiable. - The sent text is unwrapped - previously the text was wrapped in
chat.type.text
text; now the raw text is sent. (The rendered text is constructed client-side.) This means that you can no longer configure<username> message
part fully server-side unless you use the game message packet. - Server sends the packet as usual.
- Client receives the packet, and checks the timestamp and the current time - if the duration between the timestamp and the current time exceeds 4 minutes, it will warn in the log (but does not reject the message). Similarly if the message signature cannot be verified it will warn in the log but does not reject the message.
- Client uses
text.getString()
for verifying - which means that while stying changes do not affect the verification, if the server sends a custom text, it will always fail the verification (and can thus spam the log). - Final change worth mentioning, the
UUID
parameter inClientChatListener#onChatMessage
was replaced withChatSender
.
TL;DR:
- S2C Chat packet split
- Server sends the raw text, no longer wrapped in
chat.type.text
, client wraps it - sendMessage/broadcast methods changed
- If you modify the Text the player sends as chat message, the clients will log spam (send as game message instead)
NetworkEncryptionUtils
has received new methods and classes.SecureRandomUtil
provides a secure random instance andSignatureData
stores the signature and its nonce. New methods includeupdateSignature
for generating the chat message signature and RSA key serialization and deserialization.PacketByteBuf
has received additional methods for reading/writingEither
,GameProfile
, and authlibProperty
.Util#waitAndApply
was added to run tasks using prepare-apply model, which is used to createSaveLoader
in vanilla.- Exceptions can now extend
TextifiedException
to useText
as the exception message. AbstractBlock#onStacksDropped
has a new parameter,dropExperience
; code that drops experience orbs when broken should check this.AbstractBlockState#onStacksDropped
had the same change.- Explosions now trigger
onStacksDropped
. They currently drop experience only if it originates from the player (aka flint-and-steel-lit TNT). InventoryOwner#getInventory
now must returnSimpleInventory
.InventoryOwner
also has a newpickUpItem
method used by allays and villagers.BufferBuilder#end
now returns a new class instance to be passed to variousBufferRenderer
methods.ScreenHandler#transferSlot
is now an abstract method and must be implemented. Screens without slot transfer functonality should override and returnItemStack.EMPTY
.Codecs
now has a codec forInstant
, represented using ISO format string.UseAction#TOOT_HORN
was added.RamImpactTask
is now goat-specific.LevelStorage#loadSummaries
now returns the sorted list.- Jigsaw blocks no longer create a temporary structure when generating.
Nice to see verified what the public key private key signing stuff does