0x01 S01PacketJoinGame
Welcomes the player into the world. Sends entity ID, gamemode, dimension, difficulty, max players, world type, and reduced debug info.
Fields
| Field | Type | Description |
|---|---|---|
| entityId | int | The player's own entity ID |
| gamemode | unsigned byte | 0=survival, 1=creative, 2=adventure, 3=spectator |
| dimension | byte | -1=nether, 0=overworld, 1=end |
| difficulty | unsigned byte | Server difficulty (0-3) |
| maxPlayers | unsigned byte | Max players (used to draw tab player list) |
| worldType | String | 'default', 'flat', 'largeBiomes', 'amplified', 'customized' |
| reducedDebugInfo | boolean | Whether to hide coordinates in F3 debug screen |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Entity ID | int | Player's own entity ID on the server |
| Gamemode | unsigned byte | 0=survival, 1=creative, 2=adventure, 3=spectator |
| Dimension | byte | -1=nether, 0=overworld, 1=end |
| Difficulty | unsigned byte | 0=peaceful, 1=easy, 2=normal, 3=hard |
| Max Players | unsigned byte | Used for tab list rendering |
| Level Type | String | 'default', 'flat', 'largeBiomes', 'amplified', 'customized' |
| Reduced Debug Info | boolean | If true, hides coords from F3 |
MCP References
MCP
NetHandlerPlayClient.handleJoinGame()Handler Interface
HND
INetHandlerPlayClientNotes
This is the VERY FIRST PLAY-state packet the client receives after login. It creates the WorldClient and EntityPlayerSP. All modules that depend on mc.theWorld or mc.thePlayer being non-null must wait for this packet. It's the universal 'onWorldLoad' trigger.
implementation Implementation Cases
SessionInfo
(Tenacity 6.0)
Capture entity ID, gamemode, dimension on join. Used by modules for initialization.
if (event.getPacket() instanceof S01PacketJoinGame) {
S01PacketJoinGame s01 = (S01PacketJoinGame) event.getPacket();
playerEntityId = s01.getEntityId();
gamemode = s01.getGameType();
}AutoRegister
(Tenacity 6.0)
Capture entity ID, gamemode, dimension on join. Used by modules for initialization.
if (event.getPacket() instanceof S01PacketJoinGame) {
S01PacketJoinGame s01 = (S01PacketJoinGame) event.getPacket();
playerEntityId = s01.getEntityId();
gamemode = s01.getGameType();
}NameProtect
(Tenacity 6.0)
Capture entity ID, gamemode, dimension on join. Used by modules for initialization.
if (event.getPacket() instanceof S01PacketJoinGame) {
S01PacketJoinGame s01 = (S01PacketJoinGame) event.getPacket();
playerEntityId = s01.getEntityId();
gamemode = s01.getGameType();
}