summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_14.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-11 20:42:22 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-18 17:41:06 +0200
commitacc399ffb3a8a542b0bb99d056de045f7e7d26e0 (patch)
tree711c11765121f5c96699c5cb4864e3d8c9787c28 /src/Protocol/Protocol_1_14.cpp
parentAdding Generator For Single Piece Structures (#4830) (diff)
downloadcuberite-acc399ffb3a8a542b0bb99d056de045f7e7d26e0.tar
cuberite-acc399ffb3a8a542b0bb99d056de045f7e7d26e0.tar.gz
cuberite-acc399ffb3a8a542b0bb99d056de045f7e7d26e0.tar.bz2
cuberite-acc399ffb3a8a542b0bb99d056de045f7e7d26e0.tar.lz
cuberite-acc399ffb3a8a542b0bb99d056de045f7e7d26e0.tar.xz
cuberite-acc399ffb3a8a542b0bb99d056de045f7e7d26e0.tar.zst
cuberite-acc399ffb3a8a542b0bb99d056de045f7e7d26e0.zip
Diffstat (limited to 'src/Protocol/Protocol_1_14.cpp')
-rw-r--r--src/Protocol/Protocol_1_14.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/Protocol/Protocol_1_14.cpp b/src/Protocol/Protocol_1_14.cpp
index c31b3ddfb..c3e4a62d0 100644
--- a/src/Protocol/Protocol_1_14.cpp
+++ b/src/Protocol/Protocol_1_14.cpp
@@ -215,77 +215,77 @@ cProtocol::Version cProtocol_1_14::GetProtocolVersion()
-bool cProtocol_1_14::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
+std::pair<short, short> cProtocol_1_14::GetItemFromProtocolID(UInt32 a_ProtocolID)
{
- if (m_State != 3)
- {
- return Super::HandlePacket(a_ByteBuffer, a_PacketType);
- }
-
- // Game
- switch (a_PacketType)
- {
- default: AString dum; a_ByteBuffer.ReadAll(dum); a_ByteBuffer.CommitRead(); a_ByteBuffer.Write(" ", 1);
- return true;
- }
+ return PaletteUpgrade::ToItem(Palette_1_14::ToItem(a_ProtocolID));
}
-void cProtocol_1_14::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
+UInt32 cProtocol_1_14::GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
{
+ return Palette_1_14::From(PaletteUpgrade::FromBlock(a_BlockType, a_Meta));
}
-void cProtocol_1_14::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
+UInt32 cProtocol_1_14::GetProtocolItemType(short a_ItemID, short a_ItemDamage)
{
+ return Palette_1_14::From(PaletteUpgrade::FromItem(a_ItemID, a_ItemDamage));
}
-void cProtocol_1_14::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
+UInt32 cProtocol_1_14::GetProtocolStatisticType(Statistic a_Statistic)
{
+ return Palette_1_14::From(a_Statistic);
}
-std::pair<short, short> cProtocol_1_14::GetItemFromProtocolID(UInt32 a_ProtocolID)
+bool cProtocol_1_14::HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType)
{
- return PaletteUpgrade::ToItem(Palette_1_14::ToItem(a_ProtocolID));
+ if (m_State != 3)
+ {
+ return Super::HandlePacket(a_ByteBuffer, a_PacketType);
+ }
+
+ // Game
+ switch (a_PacketType)
+ {
+ default: AString dum; a_ByteBuffer.ReadAll(dum); a_ByteBuffer.CommitRead(); a_ByteBuffer.Write(" ", 1);
+ return true;
+ }
}
-UInt32 cProtocol_1_14::GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
+void cProtocol_1_14::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
{
- return Palette_1_14::FromBlock(PaletteUpgrade::FromBlock(a_BlockType, a_Meta));
}
-UInt32 cProtocol_1_14::GetProtocolItemType(short a_ItemID, short a_ItemDamage)
+void cProtocol_1_14::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
{
- return Palette_1_14::FromItem(PaletteUpgrade::FromItem(a_ItemID, a_ItemDamage));
}
-UInt32 cProtocol_1_14::GetProtocolStatisticType(Statistic a_Statistic)
+void cProtocol_1_14::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
{
- return Palette_1_14::From(a_Statistic);
}