Cuberite
A lightweight, fast and extensible game server for Minecraft
NamespaceSerializer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Defines.h"
4 #include "Mobs/MonsterTypes.h"
6 
8 {
9  enum class Namespace
10  {
11  Minecraft,
12  Cuberite,
13  Unknown
14  };
15 
16  unsigned DataVersion();
17 
18  std::string_view From(CustomStatistic a_ID);
19  std::string_view From(eMonsterType a_ID);
20  std::string_view From(BannerPattern a_ID);
21 
22  CustomStatistic ToCustomStatistic(std::string_view a_ID);
23  eMonsterType ToMonsterType(std::string_view a_ID);
24 
25  std::pair<Namespace, std::string_view> SplitNamespacedID(std::string_view ID);
26 
27  // Examples: Input: "wolf" -> Output: "Wolf", Input: "iron_golem" -> Output: "Iron Golem"
28  AString Prettify(AString a_ID);
29  AString PrettifyEntityName(const AString & a_ID, const bool a_IsTamed = false);
30 }
BannerPattern
Definition: Defines.h:380
eMonsterType
Identifies individual monster type.
Definition: MonsterTypes.h:11
CustomStatistic
std::string AString
Definition: StringUtils.h:11
AString Prettify(AString a_ID)
AString PrettifyEntityName(const AString &a_ID, const bool a_IsTamed=false)
std::string_view From(CustomStatistic a_ID)
CustomStatistic ToCustomStatistic(std::string_view a_ID)
std::pair< Namespace, std::string_view > SplitNamespacedID(std::string_view ID)
eMonsterType ToMonsterType(std::string_view a_ID)