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