public void Read(PacketReader reader) { PacketType type = (PacketType)reader.ReadByte(); Logger.LogToConsole( type.ToString() ); SharedSecretLength = reader.ReadShort(); SharedSecret = reader.ReadBytes(SharedSecretLength); VerifyTokenLength = reader.ReadShort(); VerifyTokenResponse = reader.ReadBytes(VerifyTokenLength); }
public override void Read(PacketReader stream) { int posX = stream.ReadInt(); short posY = stream.ReadShort(); int posZ = stream.ReadInt(); byte sizeX = (byte)(stream.ReadByte() + 1); byte sizeY = (byte)(stream.ReadByte() + 1); byte sizeZ = (byte)(stream.ReadByte() + 1); int o = sizeX * sizeY * sizeZ; Chunk = new Chunk(null, new Vector3I(posX, posY, posZ)); int len = stream.ReadInt(); stream.ReadBytes(len); }