summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.cpp
diff options
context:
space:
mode:
authorchangyong guo <guo1487@163.com>2018-07-23 00:23:33 +0200
committerpeterbell10 <peterbell10@live.co.uk>2018-07-23 00:23:33 +0200
commit3e802932a6797fc0f4768ebc61cf9ac4f498c7fb (patch)
tree18dc1b8ce84c3202034c859a3d775c8beb2b68be /src/Protocol/Protocol_1_8.cpp
parentcIsThread: Reset m_ShouldTerminate after the thread has stopped (#4258) (diff)
downloadcuberite-3e802932a6797fc0f4768ebc61cf9ac4f498c7fb.tar
cuberite-3e802932a6797fc0f4768ebc61cf9ac4f498c7fb.tar.gz
cuberite-3e802932a6797fc0f4768ebc61cf9ac4f498c7fb.tar.bz2
cuberite-3e802932a6797fc0f4768ebc61cf9ac4f498c7fb.tar.lz
cuberite-3e802932a6797fc0f4768ebc61cf9ac4f498c7fb.tar.xz
cuberite-3e802932a6797fc0f4768ebc61cf9ac4f498c7fb.tar.zst
cuberite-3e802932a6797fc0f4768ebc61cf9ac4f498c7fb.zip
Diffstat (limited to 'src/Protocol/Protocol_1_8.cpp')
-rw-r--r--src/Protocol/Protocol_1_8.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index 58f067278..643f99841 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -592,6 +592,19 @@ void cProtocol_1_8_0::SendHealth(void)
+void cProtocol_1_8_0::SendHeldItemChange(int a_ItemIndex)
+{
+ ASSERT((a_ItemIndex >= 0) && (a_ItemIndex <= 8)); // Valid check
+
+ cPacketizer Pkt(*this, 0x09); // Held item change
+ cPlayer * Player = m_Client->GetPlayer();
+ Pkt.WriteBEInt8(static_cast<Int8>(Player->GetInventory().GetEquippedSlotNum()));
+}
+
+
+
+
+
void cProtocol_1_8_0::SendHideTitle(void)
{
ASSERT(m_State == 3); // In game mode?