Skip to content

These docs were made completely by AI, so they might be right, or wrong, you'll need to test them yourself. This was made for a easier understanding of everything. So use at your own risk. If anything is wrong, please don't hurt to make a PR on the page you have a problem with. ON GITHUB

Packet ID Registry

Every packet in LCE is registered in Packet::staticCtor() inside Minecraft.World/Packet.cpp. The map() call signature looks like this:

map(id, receiveOnClient, receiveOnServer, sendToAnyClient, renderStats, typeid, createFn)

Direction key:

  • S->C means the server sends it to the client (receiveOnClient = true, receiveOnServer = false)
  • C->S means the client sends it to the server (receiveOnClient = false, receiveOnServer = true)
  • Both means either direction (receiveOnClient = true, receiveOnServer = true)
IDClass NameDirectionBroadcastPurpose
0KeepAlivePacketBothyesConnection keepalive heartbeat
1LoginPacketBothyesLogin / session establishment
2PreLoginPacketBothyesPre-login handshake
3ChatPacketBothyesChat message
4SetTimePacketS->CnoSet world time
5SetEquippedItemPacketS->CnoSet entity equipped item
6SetSpawnPositionPacketS->CyesSet world spawn position
7InteractPacketC->SnoPlayer interact with entity
8SetHealthPacketS->CyesSet player health / food / saturation
9RespawnPacketBothyesPlayer respawn / dimension change
10MovePlayerPacketBothyesFull player movement
11MovePlayerPacket::PosBothyesPlayer position only
12MovePlayerPacket::RotBothyesPlayer rotation only
13MovePlayerPacket::PosRotBothyesPlayer position and rotation
14PlayerActionPacketC->SnoBlock dig / drop / swap actions
15UseItemPacketC->SnoRight-click / place block
16SetCarriedItemPacketC->SnoChange held item slot
17EntityActionAtPositionPacketS->CyesEntity action at position (sleep in bed)
18AnimatePacketBothyesEntity animation (arm swing, etc.)
19PlayerCommandPacketC->SnoPlayer command (sneak, sprint, etc.)
20AddPlayerPacketS->CnoSpawn named player entity
22TakeItemEntityPacketS->CyesEntity picks up item
23AddEntityPacketS->CnoSpawn object / vehicle entity
24AddMobPacketS->CnoSpawn mob entity
25AddPaintingPacketS->CnoSpawn painting entity
26AddExperienceOrbPacketS->CnoSpawn experience orb (added 1.8.2)
28SetEntityMotionPacketS->CyesSet entity velocity (knockback)
29RemoveEntitiesPacketS->CnoDestroy / remove entities
30MoveEntityPacketS->CnoEntity movement (base)
31MoveEntityPacket::PosS->CnoEntity relative position
32MoveEntityPacket::RotS->CnoEntity rotation
33MoveEntityPacket::PosRotS->CnoEntity relative position + rotation
34TeleportEntityPacketS->CnoEntity teleport (absolute position)
35RotateHeadPacketS->CnoEntity head rotation (added 1.2.3)
38EntityEventPacketS->CyesEntity status event (damage, death, etc.)
39SetRidingPacketS->CyesAttach entity to vehicle
40SetEntityDataPacketS->CyesEntity metadata (synched data)
41UpdateMobEffectPacketS->CyesApply / update mob potion effect
42RemoveMobEffectPacketS->CyesRemove mob potion effect
43SetExperiencePacketS->CyesSet player experience bar
50ChunkVisibilityPacketS->CyesChunk load / unload notification
51BlockRegionUpdatePacketS->CyesFull chunk data transfer
52ChunkTilesUpdatePacketS->CyesMultiple block changes in a chunk
53TileUpdatePacketS->CyesSingle block change
54TileEventPacketS->CyesBlock action (note block, piston, chest)
55TileDestructionPacketS->CnoBlock break animation progress (added 1.3.2)
60ExplodePacketS->CyesExplosion event
61LevelEventPacketS->CyesLevel event (sounds, particles)
62LevelSoundPacketS->CyesNamed sound event (added 1.3.2)
70GameEventPacketS->CnoGame state change (rain, credits, etc.)
71AddGlobalEntityPacketS->CnoSpawn global entity (lightning bolt)
100ContainerOpenPacketS->CyesOpen container window
101ContainerClosePacketBothyesClose container window
102ContainerClickPacketC->SnoClick slot in container
103ContainerSetSlotPacketBothyesSet single container slot
104ContainerSetContentPacketS->CyesSet entire container contents
105ContainerSetDataPacketS->CyesUpdate container property (furnace progress, etc.)
106ContainerAckPacketBothyesContainer transaction acknowledgement
107SetCreativeModeSlotPacketBothyesCreative mode inventory action (added 1.8.2)
108ContainerButtonClickPacketC->SnoButton click in container (added 1.0.1)
130SignUpdatePacketBothyesEdit sign text
131ComplexItemDataPacketS->CyesMap item data
132TileEntityDataPacketS->CnoTile entity NBT data (added 1.0.1)
150CraftItemPacketC->SnoCraft item request (4J added)
151TradeItemPacketC->SyesVillager trade request (4J added)
152DebugOptionsPacketC->SnoDebug options toggle (4J added)
153ServerSettingsChangedPacketBothnoServer settings sync (4J added)
154TexturePacketBothyesTexture pack data (4J added)
155ChunkVisibilityAreaPacketS->CyesChunk visibility area bounds (4J added)
156UpdateProgressPacketS->CnoLoading / generation progress (4J added)
157TextureChangePacketBothyesTexture pack change notification (4J added)
158UpdateGameRuleProgressPacketS->CyesGame rule progress update (4J added)
159KickPlayerPacketC->SnoKick player request (4J added)
160TextureAndGeometryPacketBothyesTexture + geometry pack data (4J added)
161TextureAndGeometryChangePacketBothyesTexture + geometry change (4J added)
162MoveEntityPacketSmallS->CnoSmall entity movement (base, 4J added)
163MoveEntityPacketSmall::PosS->CnoSmall entity relative position (4J added)
164MoveEntityPacketSmall::RotS->CnoSmall entity rotation (4J added)
165MoveEntityPacketSmall::PosRotS->CnoSmall entity position + rotation (4J added)
166XZPacketBothnoXZ coordinate packet (4J added)
167GameCommandPacketC->SnoIn-game command execution (4J added)
200AwardStatPacketS->CyesAward statistic to player
201PlayerInfoPacketBothnoPlayer list info (repurposed by 4J, 1.8.2)
202PlayerAbilitiesPacketBothyesPlayer abilities (fly, creative, etc., added 1.3.2)
205ClientCommandPacketC->SyesClient command (respawn, stats, added 1.3.2)
250CustomPayloadPacketBothyesPlugin channel / custom payload (added 1.1 / TU9)
254GetInfoPacketC->SnoServer list ping (added 1.8.2)
255DisconnectPacketBothyesDisconnect / kick reason

The MinecraftConsoles repo adds these packets not in the LCEMP source:

IDClass NameDirectionBroadcastPurpose
27PlayerInputPacketC->SnoPlayer vehicle input (was commented out in LCEMP, now active)
39SetEntityLinkPacketS->CyesEntity link / leash (replaces SetRidingPacket)
44UpdateAttributesPacketS->CyesEntity attribute sync (new)
63LevelParticlesPacketS->CyesSpawn particles at position (new)
133TileEditorOpenPacketS->CyesOpen tile editor (command block, new)
206SetObjectivePacketS->CyesScoreboard objective (new)
207SetScorePacketS->CyesScoreboard score update (new)
208SetDisplayObjectivePacketS->CyesScoreboard display slot (new)
209SetPlayerTeamPacketS->CyesScoreboard team update (new)

Total registered packets (LCEMP): 88 (IDs 0 to 255, with gaps)

Total registered packets (MinecraftConsoles): 97 (IDs 0 to 255, with gaps)

These IDs show up in comments but aren’t registered in either codebase:

IDClass NameNotes
21(gap)No packet registered at this ID
203ChatAutoCompletePacket”Don’t think we need them” (1.3.2)
204ClientInformationPacket”Don’t think we need them” (1.3.2)
252SharedKeyPacket”Don’t think we need them” (1.3.2)
253ServerAuthDataPacket”Don’t think we need them” (1.3.2)
  • The Broadcast column matches the sendToAnyClient parameter. When yes, the packet goes to all connected clients. When no, it’s sent per-dimension per-machine (a 4J splitscreen optimization).
  • Packets marked (4J added) are custom additions by 4J Studios for the Legacy Console Edition and don’t exist in vanilla Java Edition.
  • MoveEntityPacketSmall (162 to 165) is an optimized version of MoveEntityPacket (30 to 33) for smaller position changes.
  • ContainerSetSlotPacket (103) has conditional direction: in non-content-package builds it can also be sent C->S for debug purposes. This is the same in both codebases.
  • The renderStats parameter controls which packets show up in the debug network stats overlay. Packets with renderStats = true tend to be the high-traffic ones like entity movement and chunk data.

Source files:

  • LCEMP: Minecraft.World/Packet.cpp
  • MinecraftConsoles: Minecraft.World/Packet.cpp