Tracking: Protocol Implementation #2

Open
opened 2026-02-25 06:21:16 +00:00 by tylercritchlow · 0 comments

Minecraft Java Edition Protocol

Connection States

  • Handshaking state handling
  • Status state (ping/server list)
  • Login state (partial)
  • Configuration state
  • Play state

Handshaking (C→S)

  • 0x00 Handshake (protocol version, server address, port, next state)

Status State

Clientbound (S→C)

  • 0x00 Status Response (JSON server status)
  • 0x01 Ping Response

Serverbound (C→S)

  • 0x00 Status Request
  • 0x01 Ping Request

Login State

Clientbound (S→C)

  • 0x00 Disconnect (Login)
  • 0x01 Encryption Request
  • 0x02 Login Success
  • 0x03 Set Compression
  • 0x04 Login Plugin Request

Serverbound (C→S)

  • 0x00 Login Start

Login Logic

  • Online mode: Mojang session server authentication (hasJoinedServer)
  • Offline mode: UUID generation from player name
  • Encryption (AES/CFB8 shared secret)
  • Packet compression (zlib, configurable threshold)

Configuration State

Clientbound (S→C)

  • 0x00 Cookie Request
  • 0x01 Plugin Message (brand, etc.)
  • 0x02 Disconnect
  • 0x03 Finish Configuration
  • 0x04 Keep Alive
  • 0x05 Ping
  • 0x06 Reset Chat
  • 0x07 Registry Data (dimension types, biomes, chat types, damage types, etc.)
  • 0x08 Remove Resource Pack
  • 0x09 Add Resource Pack
  • 0x0A Store Cookie
  • 0x0B Transfer
  • 0x0C Feature Flags
  • 0x0D Update Tags
  • 0x0E Known Packs

Serverbound (C→S)

  • 0x00 Client Information
  • 0x01 Cookie Response
  • 0x02 Plugin Message
  • 0x03 Acknowledge Finish Configuration
  • 0x04 Keep Alive
  • 0x05 Pong
  • 0x06 Resource Pack Response
  • 0x07 Known Packs

Play State — Clientbound (S→C)

Joining & World Info

  • Login (Play) — game mode, dimension, seed hash, max players, view distance, etc.
  • Respawn — dimension change, game mode, etc.
  • Change Difficulty
  • Game Event (e.g., begin raining, change game mode, win game)
  • Server Data (MOTD, icon, enforces secure chat)

Chunk & World Data

  • Chunk Data and Update Light
  • Update Light
  • Unload Chunk
  • Block Update
  • Multi Block Change / Section Blocks Update
  • Block Entity Data
  • Block Breaking Animation
  • Effect (block break sounds, etc.)
  • Level Event
  • World Border Init / Center / Size / Lerp Size / Warning Distance / Warning Time

Entity Management

  • Spawn Entity
  • Spawn Experience Orb
  • Entity Animation (swing arm, etc.)
  • Entity Metadata
  • Entity Relative Move
  • Entity Rotate
  • Entity Move And Rotate
  • Teleport Entity
  • Set Entity Velocity
  • Set Entity Motion
  • Remove Entities
  • Entity Status (e.g., living entity hurt, death)
  • Entity Equipment
  • Update Attributes
  • Entity Effect (potion effects)
  • Remove Entity Effect
  • Update Entity Position
  • Set Head Rotation
  • Attach Entity (leash)
  • Mount Vehicle / Set Passengers

Player

  • Player Position (sync / teleport to player)
  • Set Default Spawn Position
  • Player Abilities
  • Update Player List (tab list add/update/remove)
  • Player Info Remove
  • Set Camera
  • Set Render Distance
  • Simulation Distance
  • Player Combat Event (enter, end, death)
  • Death Screen / Combat Death
  • Respawn
  • Experience Bar Update
  • Set Health
  • Food Saturation Sync

Inventory & Items

  • Set Container Content (window items)
  • Set Container Slot
  • Open Screen (open window)
  • Close Container
  • Set Carried Item (held item change)
  • Set Creative Mode Slot
  • Inventory (open/update)
  • Container Property
  • Open Sign Editor
  • Open Horse Screen

Chat & Messaging

  • Player Chat Message
  • System Chat Message
  • Disguised Chat Message
  • Delete Message
  • Player Chat Header
  • Chat Suggestions
  • Command Suggestions Response

Commands & UI

  • Commands (declare commands / command tree)
  • Tab List Header and Footer
  • Action Bar
  • Title
  • Subtitle
  • Title Animation
  • Clear Titles
  • Boss Bar (add, remove, update health/title/style/flags)

Sounds & Particles

  • Sound Effect
  • Named Sound Effect
  • Stop Sound
  • Particle

Maps & Scores

  • Map Data
  • Update Score
  • Reset Score
  • Display Scoreboard
  • Scoreboard Objective

Advancement & Statistics

  • Update Advancements
  • Update Statistics

NBT / Tags / Misc

  • Update Tags
  • Custom Payload (Plugin Message)
  • Ping (Play)
  • Keep Alive (Play)
  • Disconnect (Play)
  • Resource Pack (Send / Remove)
  • Initialize World Border
  • Set Ticking State
  • Step Tick
  • Projectile Power
  • Hurt Animation
  • Damage Event
  • Bundle Delimiter

Play State — Serverbound (C→S)

Movement

  • Confirm Teleportation
  • Set Player Position
  • Set Player Position and Rotation
  • Set Player Rotation
  • Set Player On Ground
  • Move Vehicle
  • Steer Vehicle

Interaction

  • Interact (attack, interact, interact at)
  • Use Item On (place block)
  • Use Item
  • Player Action (start/stop dig, drop item, shoot arrow, swap hands, finish digging)
  • Player Command (sneak, sprint, start/stop horse jump, open inventory, elytra)
  • Swing Arm
  • Pick Item
  • Use Block / Hit Block

Inventory

  • Click Container (click window)
  • Close Container
  • Set Carried Item (held item change)
  • Set Creative Mode Slot
  • Click Container Button
  • Container Slot State Changed

Chat & Commands

  • Chat Message
  • Chat Command
  • Signed Chat Command
  • Chat Session Update / Player Session
  • Message Acknowledgment

Misc

  • Client Information (locale, render distance, chat mode, etc.)
  • Plugin Message (Custom Payload)
  • Keep Alive (Play)
  • Pong (Play)
  • Query Block Entity Tag
  • Query Entity Tag
  • Change Recipe Book Settings
  • Set Seen Recipe
  • Resource Pack Response
  • Rename Item
  • Select Trade
  • Set Beacon Effect
  • Update Jigsaw Block
  • Update Structure Block
  • Update Sign
  • Lock Difficulty
  • Set Player Abilities (client-side fly toggle)

Core Server Systems (Beyond Raw Packets)

  • Packet framing: VarInt length-prefixed packets
  • VarInt / VarLong encoding/decoding
  • NBT serialization/deserialization
  • Chunk section format (palette, block states, biomes)
  • Heightmap encoding
  • Entity metadata encoding
  • Slot / ItemStack encoding
  • Registry codec (dimension type, biome, chat type, damage type)
  • UUID handling
  • Position encoding (packed 64-bit long)
  • Angle encoding (1 byte = 360/256 degrees)
  • Encryption (RSA key pair generation + AES/CFB8)
  • Compression (zlib deflate/inflate)
  • Keep-alive timeout tracking
  • Tick loop (20 TPS)
  • Player session / chat signing verification
# Minecraft Java Edition Protocol ## Connection States - [x] Handshaking state handling - [x] Status state (ping/server list) - [x] Login state (partial) - [ ] Configuration state - [ ] Play state --- ## Handshaking (C→S) - [x] 0x00 Handshake (protocol version, server address, port, next state) --- ## Status State ### Clientbound (S→C) - [x] 0x00 Status Response (JSON server status) - [x] 0x01 Ping Response ### Serverbound (C→S) - [x] 0x00 Status Request - [x] 0x01 Ping Request --- ## Login State ### Clientbound (S→C) - [ ] 0x00 Disconnect (Login) - [ ] 0x01 Encryption Request - [ ] 0x02 Login Success - [ ] 0x03 Set Compression - [ ] 0x04 Login Plugin Request ### Serverbound (C→S) - [x] 0x00 Login Start ### Login Logic - [ ] Online mode: Mojang session server authentication (hasJoinedServer) - [ ] Offline mode: UUID generation from player name - [ ] Encryption (AES/CFB8 shared secret) - [ ] Packet compression (zlib, configurable threshold) --- ## Configuration State ### Clientbound (S→C) - [ ] 0x00 Cookie Request - [ ] 0x01 Plugin Message (brand, etc.) - [ ] 0x02 Disconnect - [ ] 0x03 Finish Configuration - [ ] 0x04 Keep Alive - [ ] 0x05 Ping - [ ] 0x06 Reset Chat - [ ] 0x07 Registry Data (dimension types, biomes, chat types, damage types, etc.) - [ ] 0x08 Remove Resource Pack - [ ] 0x09 Add Resource Pack - [ ] 0x0A Store Cookie - [ ] 0x0B Transfer - [ ] 0x0C Feature Flags - [ ] 0x0D Update Tags - [ ] 0x0E Known Packs ### Serverbound (C→S) - [ ] 0x00 Client Information - [ ] 0x01 Cookie Response - [ ] 0x02 Plugin Message - [ ] 0x03 Acknowledge Finish Configuration - [ ] 0x04 Keep Alive - [ ] 0x05 Pong - [ ] 0x06 Resource Pack Response - [ ] 0x07 Known Packs --- ## Play State — Clientbound (S→C) ### Joining & World Info - [ ] Login (Play) — game mode, dimension, seed hash, max players, view distance, etc. - [ ] Respawn — dimension change, game mode, etc. - [ ] Change Difficulty - [ ] Game Event (e.g., begin raining, change game mode, win game) - [ ] Server Data (MOTD, icon, enforces secure chat) ### Chunk & World Data - [ ] Chunk Data and Update Light - [ ] Update Light - [ ] Unload Chunk - [ ] Block Update - [ ] Multi Block Change / Section Blocks Update - [ ] Block Entity Data - [ ] Block Breaking Animation - [ ] Effect (block break sounds, etc.) - [ ] Level Event - [ ] World Border Init / Center / Size / Lerp Size / Warning Distance / Warning Time ### Entity Management - [ ] Spawn Entity - [ ] Spawn Experience Orb - [ ] Entity Animation (swing arm, etc.) - [ ] Entity Metadata - [ ] Entity Relative Move - [ ] Entity Rotate - [ ] Entity Move And Rotate - [ ] Teleport Entity - [ ] Set Entity Velocity - [ ] Set Entity Motion - [ ] Remove Entities - [ ] Entity Status (e.g., living entity hurt, death) - [ ] Entity Equipment - [ ] Update Attributes - [ ] Entity Effect (potion effects) - [ ] Remove Entity Effect - [ ] Update Entity Position - [ ] Set Head Rotation - [ ] Attach Entity (leash) - [ ] Mount Vehicle / Set Passengers ### Player - [ ] Player Position (sync / teleport to player) - [ ] Set Default Spawn Position - [ ] Player Abilities - [ ] Update Player List (tab list add/update/remove) - [ ] Player Info Remove - [ ] Set Camera - [ ] Set Render Distance - [ ] Simulation Distance - [ ] Player Combat Event (enter, end, death) - [ ] Death Screen / Combat Death - [ ] Respawn - [ ] Experience Bar Update - [ ] Set Health - [ ] Food Saturation Sync ### Inventory & Items - [ ] Set Container Content (window items) - [ ] Set Container Slot - [ ] Open Screen (open window) - [ ] Close Container - [ ] Set Carried Item (held item change) - [ ] Set Creative Mode Slot - [ ] Inventory (open/update) - [ ] Container Property - [ ] Open Sign Editor - [ ] Open Horse Screen ### Chat & Messaging - [ ] Player Chat Message - [ ] System Chat Message - [ ] Disguised Chat Message - [ ] Delete Message - [ ] Player Chat Header - [ ] Chat Suggestions - [ ] Command Suggestions Response ### Commands & UI - [ ] Commands (declare commands / command tree) - [ ] Tab List Header and Footer - [ ] Action Bar - [ ] Title - [ ] Subtitle - [ ] Title Animation - [ ] Clear Titles - [ ] Boss Bar (add, remove, update health/title/style/flags) ### Sounds & Particles - [ ] Sound Effect - [ ] Named Sound Effect - [ ] Stop Sound - [ ] Particle ### Maps & Scores - [ ] Map Data - [ ] Update Score - [ ] Reset Score - [ ] Display Scoreboard - [ ] Scoreboard Objective ### Advancement & Statistics - [ ] Update Advancements - [ ] Update Statistics ### NBT / Tags / Misc - [ ] Update Tags - [ ] Custom Payload (Plugin Message) - [ ] Ping (Play) - [ ] Keep Alive (Play) - [ ] Disconnect (Play) - [ ] Resource Pack (Send / Remove) - [ ] Initialize World Border - [ ] Set Ticking State - [ ] Step Tick - [ ] Projectile Power - [ ] Hurt Animation - [ ] Damage Event - [ ] Bundle Delimiter --- ## Play State — Serverbound (C→S) ### Movement - [ ] Confirm Teleportation - [ ] Set Player Position - [ ] Set Player Position and Rotation - [ ] Set Player Rotation - [ ] Set Player On Ground - [ ] Move Vehicle - [ ] Steer Vehicle ### Interaction - [ ] Interact (attack, interact, interact at) - [ ] Use Item On (place block) - [ ] Use Item - [ ] Player Action (start/stop dig, drop item, shoot arrow, swap hands, finish digging) - [ ] Player Command (sneak, sprint, start/stop horse jump, open inventory, elytra) - [ ] Swing Arm - [ ] Pick Item - [ ] Use Block / Hit Block ### Inventory - [ ] Click Container (click window) - [ ] Close Container - [ ] Set Carried Item (held item change) - [ ] Set Creative Mode Slot - [ ] Click Container Button - [ ] Container Slot State Changed ### Chat & Commands - [ ] Chat Message - [ ] Chat Command - [ ] Signed Chat Command - [ ] Chat Session Update / Player Session - [ ] Message Acknowledgment ### Misc - [ ] Client Information (locale, render distance, chat mode, etc.) - [ ] Plugin Message (Custom Payload) - [ ] Keep Alive (Play) - [ ] Pong (Play) - [ ] Query Block Entity Tag - [ ] Query Entity Tag - [ ] Change Recipe Book Settings - [ ] Set Seen Recipe - [ ] Resource Pack Response - [ ] Rename Item - [ ] Select Trade - [ ] Set Beacon Effect - [ ] Update Jigsaw Block - [ ] Update Structure Block - [ ] Update Sign - [ ] Lock Difficulty - [ ] Set Player Abilities (client-side fly toggle) --- ## Core Server Systems (Beyond Raw Packets) - [x] Packet framing: VarInt length-prefixed packets - [x] VarInt / VarLong encoding/decoding - [ ] NBT serialization/deserialization - [ ] Chunk section format (palette, block states, biomes) - [ ] Heightmap encoding - [ ] Entity metadata encoding - [ ] Slot / ItemStack encoding - [ ] Registry codec (dimension type, biome, chat type, damage type) - [x] UUID handling - [ ] Position encoding (packed 64-bit long) - [ ] Angle encoding (1 byte = 360/256 degrees) - [ ] Encryption (RSA key pair generation + AES/CFB8) - [ ] Compression (zlib deflate/inflate) - [x] Keep-alive timeout tracking - [ ] Tick loop (20 TPS) - [ ] Player session / chat signing verification
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tylercritchlow/rusty-bucket#2
No description provided.