public static void Read(TcpClientm d) { Vector3 pos = d.NetStream.ReadVector3(); byte mode = d.NetStream.ReadByte(d); byte type = d.NetStream.ReadByte(d); d.cli.onCBlock(pos, mode, type); }
public Packet8Position(TcpClientm d, sbyte id, Vector3 pos, Vector2 rot) { this.data = d; this.id = id; this.pos = pos; this.rot = rot; }
public static void Read(TcpClientm d) { d.NetStream.ReadByte(d); Vector3 pos = d.NetStream.ReadVector3(); Vector2 rot = d.NetStream.ReadVector2(); d.cli.onPosition(pos, rot); }
public static void Read(TcpClientm d) { byte pv = d.NetStream.ReadByte(d); string str = d.NetStream.ReadString(d); string vk = d.NetStream.ReadString(d); d.NetStream.ReadByte(d); d.cli.onJoin(pv, str, vk); }
public Packet7Spawn(TcpClientm d, sbyte id, string name, Vector3 pos, Vector2 rot) { this.data = d; this.id = id; this.name = name; this.pos = pos; this.rot = rot; }
public static void WriteBytes(TcpClientm d, byte[] b) { if (b != null) { d.Write((short)b.Length); d.Write(b); } else d.Write((short)0); }
public static void Read(TcpClientm d) { byte c = d.NetStream.ReadByte(d); string mes = d.NetStream.ReadString(d); d.cli.onMessage(c, mes); }
public Packet13Message(TcpClientm d, sbyte id, string message) { this.data = d; this.id = id; this.message = message; }
public Packet6SetBlock(TcpClientm d, Vector3 pos, byte Blocktype) { this.data = d; this.pos = pos; this.Blocktype = Blocktype; }
public Packet2Level(TcpClientm d) { this.data = d; }
public PacketKick(TcpClientm d, string mes) { this.data = d; this.message = mes; }
public Packet4LevelFin(TcpClientm d, Vector3 size) { this.data = d; this.size = size; }
public Packet0Indentification(TcpClientm d, byte pv, byte ut) { this.data = d; this.protocolVersion = pv; this.usertype = ut; }
public Packet3Chunk(TcpClientm d, byte[] data, byte compl) { this.data = d; this.Chunkdata = data; this.complete = compl; }
public static void WriteString(TcpClientm d, string s) { d.Write((short)s.Length); if (s.Length > 0) d.Write(s); }
public PacketDespawn(TcpClientm d, sbyte id) { this.data = d; this.id = id; }
public static void Read(TcpClientm d) { }
public static byte[] ReadBytes(TcpClientm d) { short lenght = d.NetStream.ReadInt16(d); return d.NetStream.ReadBytes(d, lenght); }