Miscellaneous packets that I didn’t know where else to put.
Typical server origin | NetClientHandler (Client processing) | Called by Client during processing | |
Packet3Chat Chat messages including commands | EntityPlayerMP | .handleChat() Print to GUI | FMLNetworkHandler.handleChatMessage() Forge Event: ClientChatReceivedEvent GUINewChat.printChatMessage() |
Packet4UpdateTime Synchronise Client time from server | MinecraftServer ServerConfigurationManager | .handleUpdateTime() Synchronise world’s time to server | |
Packet203AutoComplete Server sends possible autocompletions for the given string fragment previously sent by the client | NetServerHandler .handleAutoComplete() | .handleAutoComplete() inserts the possible autocompletions into the GUIchat | GUIchat |
Packet206SetObjective to Packet209SetPlayerTeam | ServerScoreboard | Handle teams and objectives, not sure what these are for. | |
Packet250CustomPayload Channel (string) Length Rawdata (byte stream) | Vanilla: ServerConfigurationManager EntityPlayerMP NetClientHandler ForgePacket FML.common.network | .handleCustomPayload() Channels starting with MC| are handled by vanilla code (Request texture pack load; login information; merchant transaction information) Channels starting with FML are sent to handleFMLPacket. All others are sent to NetworkRegistry.handleCustomPacket (mod can register a custom handler) | FMLNetworkHandler.handlePacket250Packet handleFMLPacket; handleVanilla250Packet |
Packets 252+ : connection maintenance |
There are also a number of packets used by Forge - see FMLPacket.
The most relevant ones are
- EntitySpawnPacket - which gets passed to a user-supplied function when the entity spawns.
- EntitySpawnAdjustmentPacket - used to adjust an Entity's location
- OpenGuiPacket - opens a Graphical User Interface screen on the client or server.
Tidak ada komentar:
Posting Komentar