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