Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

The dispatch module contains functions that will change the state of the active Connection. Each function in dispatch corresponds not to a specific packet, but to a whole state. Each state has different packets, and a packet can be named the name but have different intent based on state.

§Example of state switch

(Initial state: ‘Handshake’) We receive a Handshake packet, ID=0x00 with next_state(VarInt Enum) set to: 1: we switch the connection state to ‘Status’. 2: we switch the connection state to ‘Login’. 3: we switch the connection state to ‘Transfer’.

Functions§

configuration
https://minecraft.wiki/w/Java_Edition_protocol/Packets#Configuration
handshaking
https://minecraft.wiki/w/Java_Edition_protocol/Packets#Handshaking
login
https://minecraft.wiki/w/Java_Edition_protocol/Packets#Login
play
https://minecraft.wiki/w/Java_Edition_protocol/Packets#Play The largest state with over 60 different types of packets, the last one being 0x41 (65).
status
https://minecraft.wiki/w/Java_Edition_protocol/Packets#Status
transfer
https://minecraft.wiki/w/Java_Edition_protocol/Packets#Transfer État non standard côté serveur (selon version/proxy). Par défaut: ignorer proprement.