summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_14.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-04-10 16:57:16 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2021-04-12 23:35:07 +0200
commita999c5d845bd759c6d83b356c7b39e67473dc452 (patch)
treec8da72f5192293648f30b3228e7563fa7c79d13e /src/Protocol/Protocol_1_14.cpp
parentAdd animations for shield/item block & break (diff)
downloadcuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar
cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.gz
cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.bz2
cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.lz
cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.xz
cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.zst
cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_14.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Protocol/Protocol_1_14.cpp b/src/Protocol/Protocol_1_14.cpp
index 77918c7eb..f2bbdd955 100644
--- a/src/Protocol/Protocol_1_14.cpp
+++ b/src/Protocol/Protocol_1_14.cpp
@@ -131,7 +131,7 @@ void cProtocol_1_14::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, co
-UInt32 cProtocol_1_14::GetPacketID(ePacketType a_PacketType)
+UInt32 cProtocol_1_14::GetPacketID(ePacketType a_PacketType) const
{
switch (a_PacketType)
{
@@ -184,16 +184,7 @@ UInt32 cProtocol_1_14::GetPacketID(ePacketType a_PacketType)
-cProtocol::Version cProtocol_1_14::GetProtocolVersion()
-{
- return Version::v1_14;
-}
-
-
-
-
-
-std::pair<short, short> cProtocol_1_14::GetItemFromProtocolID(UInt32 a_ProtocolID)
+std::pair<short, short> cProtocol_1_14::GetItemFromProtocolID(UInt32 a_ProtocolID) const
{
return PaletteUpgrade::ToItem(Palette_1_14::ToItem(a_ProtocolID));
}
@@ -202,7 +193,7 @@ std::pair<short, short> cProtocol_1_14::GetItemFromProtocolID(UInt32 a_ProtocolI
-UInt32 cProtocol_1_14::GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
+UInt32 cProtocol_1_14::GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) const
{
return Palette_1_14::From(PaletteUpgrade::FromBlock(a_BlockType, a_Meta));
}
@@ -238,7 +229,7 @@ signed char cProtocol_1_14::GetProtocolEntityStatus(EntityAnimation a_Animation)
-UInt32 cProtocol_1_14::GetProtocolItemType(short a_ItemID, short a_ItemDamage)
+UInt32 cProtocol_1_14::GetProtocolItemType(short a_ItemID, short a_ItemDamage) const
{
return Palette_1_14::From(PaletteUpgrade::FromItem(a_ItemID, a_ItemDamage));
}
@@ -247,7 +238,7 @@ UInt32 cProtocol_1_14::GetProtocolItemType(short a_ItemID, short a_ItemDamage)
-UInt32 cProtocol_1_14::GetProtocolStatisticType(Statistic a_Statistic)
+UInt32 cProtocol_1_14::GetProtocolStatisticType(Statistic a_Statistic) const
{
return Palette_1_14::From(a_Statistic);
}
@@ -256,6 +247,15 @@ UInt32 cProtocol_1_14::GetProtocolStatisticType(Statistic a_Statistic)
+cProtocol::Version cProtocol_1_14::GetProtocolVersion() const
+{
+ return Version::v1_14;
+}
+
+
+
+
+
bool cProtocol_1_14::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
{
if (m_State != State::Game)