Skip to content

Instantly share code, notes, and snippets.

View DeJayDev's full-sized avatar
:octocat:
Work work work work work work work...

Dj Isaac DeJayDev

:octocat:
Work work work work work work work...
View GitHub Profile
@kennytv
kennytv / readme.md
Last active March 27, 2024 15:59
Signed Chat and Chat Types

Signed chat

This gist intends on clearing up some of the misinformation surrounding signed chat/the reporting feature Mojang has added to Minecraft 1.19.1. Here you can find both technical information as well as a general explanation of how these work.

Profile keys

After joining a server, clients now send a profile key used for verifying a message's authenticity. This key and thus the whole signing process is optional, but by default, servers enforce secure profiles for clients to send chat messages. Whenever the player sends a chat message and has a key associated, the message will be signed using their own private key, which the server then verifies using the public key sent after join. Assuming signature, timestamp, and message contents line up, the message goes through.

On the other end, clients can also require all broadcasted player messages to be signed, disregarding the ones without sender verified signatures.

Message signatures

TLDR, 22w06a

TLDR the TLDR

  • Tag is now TagKey
  • Registry entries have associated RegistryEntry
  • RegistryEntryList is a list of RegistryEntry, supports directly referencing items and referencing using tags
  • Registries are frozen unless you use Fabric API: to add custom entries to a registry, you need to add Fabric API as an dependency!
  • Instances of Block/Item/etc must be ALWAYS registered otherwise it'll crash.

TagKey

TagKey, like RegistryKey, is a key/identifier for a tag. Many methods that took Tag will now take TagKey instead, such as BlockState#isIn. Built-in TagKeys are still available in BlockTags class, etc.