summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NamespaceSerializer.cpp
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2021-03-15 03:47:55 +0100
committerGitHub <noreply@github.com>2021-03-15 03:47:55 +0100
commit243083e01a4b6b496ca4c0ed0a4a33499cd41936 (patch)
tree49f7149f1b765cad90cc1192dceca35e30530c8e /src/WorldStorage/NamespaceSerializer.cpp
parentDerive HugeMushroom from the base handler (diff)
downloadcuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.gz
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.bz2
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.lz
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.xz
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.tar.zst
cuberite-243083e01a4b6b496ca4c0ed0a4a33499cd41936.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/NamespaceSerializer.cpp54
1 files changed, 53 insertions, 1 deletions
diff --git a/src/WorldStorage/NamespaceSerializer.cpp b/src/WorldStorage/NamespaceSerializer.cpp
index 088714cd1..28033fe29 100644
--- a/src/WorldStorage/NamespaceSerializer.cpp
+++ b/src/WorldStorage/NamespaceSerializer.cpp
@@ -140,7 +140,7 @@ std::string_view NamespaceSerializer::From(const Statistic a_ID)
-std::string_view NamespaceSerializer::From(eMonsterType a_ID)
+std::string_view NamespaceSerializer::From(const eMonsterType a_ID)
{
switch (a_ID)
{
@@ -222,6 +222,58 @@ std::string_view NamespaceSerializer::From(eMonsterType a_ID)
+std::string_view NamespaceSerializer::From(const BannerPattern a_Pattern)
+{
+ switch (a_Pattern)
+ {
+ case BannerPattern::BottomStripe: return "bs";
+ case BannerPattern::TopStripe: return "ts";
+ case BannerPattern::LeftStripe: return "ls";
+ case BannerPattern::RightStripe: return "rs";
+ case BannerPattern::CenterStripeVertical: return "cs";
+ case BannerPattern::MiddleStripeHorizontal: return "ms";
+ case BannerPattern::DownRightStripe: return "drs";
+ case BannerPattern::DownLeftStripe: return "dls";
+ case BannerPattern::SmallVerticalStripes: return "ss";
+ case BannerPattern::DiagonalCross: return "cr";
+ case BannerPattern::SquareCross: return "sc";
+ case BannerPattern::LeftOfDiagonal: return "ld";
+ case BannerPattern::RightOfUpsideDownDiagonal: return "rud";
+ case BannerPattern::LeftOfUpsideDownDiagonal: return "lud";
+ case BannerPattern::RightOfDiagonal: return "rd";
+ case BannerPattern::VerticalHalfLeft: return "vh";
+ case BannerPattern::VerticalHalfRight: return "vhr";
+ case BannerPattern::HorizontalHalfTop: return "hh";
+ case BannerPattern::HorizontalHalfBottom: return "hhb";
+ case BannerPattern::BottomLeftCorner: return "bl";
+ case BannerPattern::BottomRightCorner: return "br";
+ case BannerPattern::TopLeftCorner: return "tl";
+ case BannerPattern::TopRightCorner: return "tr";
+ case BannerPattern::BottomTriangle: return "bt";
+ case BannerPattern::TopTriangle: return "tt";
+ case BannerPattern::BottomTriangleSawtooth: return "bts";
+ case BannerPattern::TopTriangleSawtooth: return "tts";
+ case BannerPattern::MiddleCircle: return "mc";
+ case BannerPattern::MiddleRhombus: return "mr";
+ case BannerPattern::Border: return "bo";
+ case BannerPattern::CurlyBorder: return "cbo";
+ case BannerPattern::Brick: return "bri";
+ case BannerPattern::Gradient: return "gra";
+ case BannerPattern::GradientUpsideDown: return "gru";
+ case BannerPattern::Creeper: return "cre";
+ case BannerPattern::Skull: return "sku";
+ case BannerPattern::Flower: return "flo";
+ case BannerPattern::Mojang: return "moj";
+ case BannerPattern::Globe: return "glb";
+ case BannerPattern::Piglin: return "pig";
+ }
+ UNREACHABLE("Unsupported banner pattern");
+}
+
+
+
+
+
Statistic NamespaceSerializer::ToCustomStatistic(const std::string_view ID)
{
static const std::unordered_map<std::string_view, Statistic> CustomStatistics