2016-02-28 02:32:56 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <minecraft/VersionFile.h>
|
|
|
|
#include <minecraft/MinecraftProfile.h>
|
2016-03-07 06:31:28 +05:30
|
|
|
#include <minecraft/Library.h>
|
2016-02-28 02:32:56 +05:30
|
|
|
#include <QJsonDocument>
|
|
|
|
|
2016-02-28 23:31:54 +05:30
|
|
|
class OneSixVersionFormat
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// version files / profile patches
|
|
|
|
static VersionFilePtr versionFileFromJson(const QJsonDocument &doc, const QString &filename, const bool requireOrder);
|
2016-03-19 07:36:32 +05:30
|
|
|
static QJsonDocument versionFileToJson(const VersionFilePtr &patch, bool saveOrder);
|
2016-02-28 23:31:54 +05:30
|
|
|
|
|
|
|
// libraries
|
2016-03-07 06:31:28 +05:30
|
|
|
static LibraryPtr libraryFromJson(const QJsonObject &libObj, const QString &filename);
|
|
|
|
static QJsonObject libraryToJson(Library *library);
|
2016-02-28 23:31:54 +05:30
|
|
|
|
2017-04-18 02:21:30 +05:30
|
|
|
// DEPRECATED: old 'plus' jar mods generated by the application
|
|
|
|
static LibraryPtr plusJarModFromJson(const QJsonObject &libObj, const QString &filename, const QString &originalName);
|
|
|
|
|
|
|
|
// new jar mods derived from libraries
|
|
|
|
static LibraryPtr jarModFromJson(const QJsonObject &libObj, const QString &filename);
|
|
|
|
static QJsonObject jarModtoJson(Library * jarmod);
|
2017-04-22 01:53:00 +05:30
|
|
|
|
|
|
|
// mods, also derived from libraries
|
|
|
|
static LibraryPtr modFromJson(const QJsonObject &libObj, const QString &filename);
|
|
|
|
static QJsonObject modtoJson(Library * jarmod);
|
2016-02-28 23:31:54 +05:30
|
|
|
};
|