2016-02-27 21:02:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <minecraft/VersionFile.h>
|
|
|
|
#include <minecraft/MinecraftProfile.h>
|
2016-02-28 18:01:54 +00:00
|
|
|
#include <minecraft/RawLibrary.h>
|
2016-02-27 21:02:56 +00:00
|
|
|
#include <QJsonDocument>
|
|
|
|
|
2016-02-28 18:01:54 +00:00
|
|
|
class OneSixVersionFormat
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// whole profiles from single file
|
|
|
|
static std::shared_ptr<MinecraftProfile> profileFromSingleJson(const QJsonObject &obj);
|
|
|
|
|
|
|
|
// version files / profile patches
|
|
|
|
static VersionFilePtr versionFileFromJson(const QJsonDocument &doc, const QString &filename, const bool requireOrder);
|
|
|
|
static QJsonDocument profilePatchToJson(const ProfilePatchPtr &patch, bool saveOrder);
|
|
|
|
|
|
|
|
// libraries
|
|
|
|
static RawLibraryPtr libraryFromJson(const QJsonObject &libObj, const QString &filename);
|
|
|
|
static QJsonObject libraryToJson(RawLibrary *library);
|
|
|
|
|
|
|
|
// jar mods
|
|
|
|
static JarmodPtr jarModFromJson(const QJsonObject &libObj, const QString &filename, const QString &originalName);
|
|
|
|
static QJsonObject jarModtoJson(Jarmod * jarmod);
|
|
|
|
};
|