summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/onesix/OneSixVersionFormat.h
blob: 0a29a2020d1b1ad95afe379356d0643e78f9343f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <minecraft/VersionFile.h>
#include <minecraft/MinecraftProfile.h>
#include <minecraft/Library.h>
#include <QJsonDocument>

class OneSixVersionFormat
{
public:
	// version files / profile patches
	static VersionFilePtr versionFileFromJson(const QJsonDocument &doc, const QString &filename, const bool requireOrder);
	static QJsonDocument versionFileToJson(const VersionFilePtr &patch, bool saveOrder);

	// libraries
	static LibraryPtr libraryFromJson(const QJsonObject &libObj, const QString &filename);
	static QJsonObject libraryToJson(Library *library);

	// 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);
};