예제 #1
0
        public override byte[] Write()
        {
            List <byte> bytes = new List <byte>();

            bytes.AddRange(McUUID.ToBytes(UUID));
            bytes.AddRange(McString.ToBytes(Username));
            return(bytes.ToArray());
        }
예제 #2
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());
        }