Esempio n. 1
0
        public override byte[] Write()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(McVarint.ToBytes((int)Status));
            bytes.AddRange(Location.Write());
            bytes.AddRange(McUnsignedByte.ToBytes((byte)Face));
            return(bytes.ToArray());
        }
Esempio n. 2
0
        public byte[] Stream()
        {
            var data   = Write();
            var buffer = new List <byte>(data.Length + 1);

            buffer.AddRange(McVarint.ToBytes(data.Length + 1));
            buffer.AddRange(McVarint.ToBytes(PacketId));
            buffer.AddRange(data);
            return(buffer.ToArray());
        }
Esempio n. 3
0
        public override byte[] Write()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(McVarint.ToBytes(ProtocolVersion));
            bytes.AddRange(McString.ToBytes(Address));
            bytes.AddRange(McUnsignedShort.ToBytes(Port));
            bytes.AddRange(McVarint.ToBytes((int)LoginState));
            return(bytes.ToArray());
        }
Esempio n. 4
0
        public override byte[] Write()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(McVarint.ToBytes(EntityId));;
            bytes.AddRange(McDouble.ToBytes(X));
            bytes.AddRange(McDouble.ToBytes(Y));
            bytes.AddRange(McDouble.ToBytes(Z));
            bytes.AddRange(McShort.ToBytes(Count));
            return(bytes.ToArray());
        }
Esempio n. 5
0
        public override byte[] Write()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(McVarint.ToBytes(EntityId));
            bytes.AddRange(McUUID.ToBytes(UUID));
            bytes.AddRange(McVarint.ToBytes(Type));
            bytes.AddRange(McDouble.ToBytes(X));
            bytes.AddRange(McDouble.ToBytes(Y));
            bytes.AddRange(McDouble.ToBytes(Z));
            bytes.AddRange(McUnsignedByte.ToBytes(Pitch));
            bytes.AddRange(McUnsignedByte.ToBytes(Yaw));
            bytes.AddRange(McInt.ToBytes(Data));
            bytes.AddRange(McShort.ToBytes(VelocityX));
            bytes.AddRange(McShort.ToBytes(VelocityY));
            bytes.AddRange(McShort.ToBytes(VelocityZ));
            return(bytes.ToArray());
        }
Esempio n. 6
0
 public override byte[] Write()
 {
     return(McVarint.ToBytes((int)ActionID));
 }
Esempio n. 7
0
 public override byte[] Write()
 {
     return(McVarint.ToBytes((int)Hand));
 }
Esempio n. 8
0
 public override byte[] Write()
 {
     return(McVarint.ToBytes(TeleportID));
 }
Esempio n. 9
0
 public override byte[] Write()
 {
     return(McVarint.ToBytes(Threshold));
 }