summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.h
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-08-12 10:54:36 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-19 21:45:27 +0200
commit7d0813ce8c1be14bc1b9b706644bd4aa797244ee (patch)
tree6d026a11be6db2da3d60b94b4f4a442460253e1d /src/Protocol/Protocol_1_8.h
parentAdd enhanced Gold generation in Mesa-Type Biomes (#4821) (diff)
downloadcuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.gz
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.bz2
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.lz
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.xz
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.zst
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.zip
Diffstat (limited to 'src/Protocol/Protocol_1_8.h')
-rw-r--r--src/Protocol/Protocol_1_8.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h
index aec9e2e57..b813b16bf 100644
--- a/src/Protocol/Protocol_1_8.h
+++ b/src/Protocol/Protocol_1_8.h
@@ -15,6 +15,7 @@ Declares the 1.8 protocol classes:
#include "Protocol.h"
#include "../ByteBuffer.h"
+#include "../Registries/Statistics.h"
#include "../mbedTLS++/AesCfb128Decryptor.h"
#include "../mbedTLS++/AesCfb128Encryptor.h"
@@ -254,5 +255,10 @@ private:
/** Converts an entity to a protocol-specific entity type.
Only entities that the Send Spawn Entity packet supports are valid inputs to this method */
- UInt8 GetProtocolEntityType(const cEntity & a_Entity);
+ static UInt8 GetProtocolEntityType(const cEntity & a_Entity);
+
+ /** Converts a statistic to a protocol-specific string.
+ Protocols <= 1.12 use strings, hence this is a static as the string-mapping was append-only for the versions that used it.
+ Returns an empty string, handled correctly by the client, for newer, unsupported statistics. */
+ static const char * GetProtocolStatisticName(Statistic a_Statistic);
} ;