Skip to content
This repository was archived by the owner on Nov 13, 2022. It is now read-only.

Reading Packet

Vitalij edited this page Mar 14, 2014 · 1 revision

For example see Minecraft.Events.cs in https://github.com/Aragas/MineLib.ClientWrapper

It's simple. So, you got a packet from your event. What to do next? You need to filter it first by ServerState and only then handle it with Packet Id. I recommend to use switch. So, you know that packet that is, what next? Mark is as your packet

var YourPacket = (*YourPacket*) packet;

Now you can read values from it.

Clone this wiki locally