summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NamespaceSerializer.h
blob: 6ec6bc6f7da52ccfff8f7bbd3af658b7e473646e (plain) (blame)
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
26
#pragma once

#include "Defines.h"
#include "Mobs/MonsterTypes.h"
#include "Registries/CustomStatistics.h"

namespace NamespaceSerializer
{
	enum class Namespace
	{
		Minecraft,
		Cuberite,
		Unknown
	};

	unsigned DataVersion();

	std::string_view From(CustomStatistic a_ID);
	std::string_view From(eMonsterType a_ID);
	std::string_view From(BannerPattern a_ID);

	CustomStatistic ToCustomStatistic(std::string_view a_ID);
	eMonsterType ToMonsterType(std::string_view a_ID);

	std::pair<Namespace, std::string_view> SplitNamespacedID(std::string_view ID);
}