2016-02-28 02:32:56 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <minecraft/VersionFile.h>
|
2020-06-27 15:32:31 +05:30
|
|
|
#include <minecraft/PackProfile.h>
|
2016-03-07 06:31:28 +05:30
|
|
|
#include <minecraft/Library.h>
|
2016-02-28 02:32:56 +05:30
|
|
|
#include <QJsonDocument>
|
2021-04-01 07:20:28 +05:30
|
|
|
#include <ProblemProvider.h>
|
2016-02-28 02:32:56 +05:30
|
|
|
|
2016-02-28 23:31:54 +05:30
|
|
|
class OneSixVersionFormat
|
|
|
|
{
|
|
|
|
public:
|
2018-07-15 18:21:05 +05:30
|
|
|
// 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 23:31:54 +05:30
|
|
|
|
2018-07-15 18:21:05 +05:30
|
|
|
// libraries
|
2021-04-01 07:20:28 +05:30
|
|
|
static LibraryPtr libraryFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename);
|
2018-07-15 18:21:05 +05:30
|
|
|
static QJsonObject libraryToJson(Library *library);
|
2016-02-28 23:31:54 +05:30
|
|
|
|
2018-07-15 18:21:05 +05:30
|
|
|
// DEPRECATED: old 'plus' jar mods generated by the application
|
2021-04-01 07:20:28 +05:30
|
|
|
static LibraryPtr plusJarModFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename, const QString &originalName);
|
2017-04-18 02:21:30 +05:30
|
|
|
|
2018-07-15 18:21:05 +05:30
|
|
|
// new jar mods derived from libraries
|
2021-04-01 07:20:28 +05:30
|
|
|
static LibraryPtr jarModFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename);
|
2018-07-15 18:21:05 +05:30
|
|
|
static QJsonObject jarModtoJson(Library * jarmod);
|
2017-04-22 01:53:00 +05:30
|
|
|
|
2018-07-15 18:21:05 +05:30
|
|
|
// mods, also derived from libraries
|
2021-04-01 07:20:28 +05:30
|
|
|
static LibraryPtr modFromJson(ProblemContainer & problems, const QJsonObject &libObj, const QString &filename);
|
2018-07-15 18:21:05 +05:30
|
|
|
static QJsonObject modtoJson(Library * jarmod);
|
2016-02-28 23:31:54 +05:30
|
|
|
};
|