C# Class fCraft.Packet

Show file Open project: GlennMR/800craft Class Usage Examples

Public Properties

Property Type Description
Data byte[]

Public Methods

Method Description
GetSize ( OpCode opcode ) : int

Returns packet size (in bytes) for a given opcode. Size includes the opcode byte itself.

MakeAddSelectionBox ( byte ID, string Label, short StartX, short StartY, short StartZ, short EndX, short EndY, short EndZ, short R, short G, short B, short A ) : Packet
Packet ( OpCode opcode ) : System

Creates a packet of correct size for a given opcode, and sets the first (opcode) byte.

Packet ( [ data ) : System

Private Methods

Method Description
MakeCustomBlockSupportLevel ( byte level ) : Packet
MakeExtEntry ( string name, int version ) : Packet
MakeExtInfo ( short extCount ) : Packet
MakeSetBlockPermission ( Block block, bool canPlace, bool canDelete ) : Packet
ToNetOrder ( int number, [ arr, int offset ) : void
ToNetOrder ( short number, [ arr, int offset ) : void

Method Details

GetSize() public static method

Returns packet size (in bytes) for a given opcode. Size includes the opcode byte itself.
public static GetSize ( OpCode opcode ) : int
opcode OpCode
return int

MakeAddSelectionBox() public static method

public static MakeAddSelectionBox ( byte ID, string Label, short StartX, short StartY, short StartZ, short EndX, short EndY, short EndZ, short R, short G, short B, short A ) : Packet
ID byte
Label string
StartX short
StartY short
StartZ short
EndX short
EndY short
EndZ short
R short
G short
B short
A short
return Packet

Packet() public method

Creates a packet of correct size for a given opcode, and sets the first (opcode) byte.
public Packet ( OpCode opcode ) : System
opcode OpCode
return System

Packet() public method

public Packet ( [ data ) : System
data [
return System

Property Details

Data public property

public byte[] Data
return byte[]