summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.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_9.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 '')
-rw-r--r--src/Protocol/Protocol_1_9.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index 64721ed04..2621f140c 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -636,6 +636,20 @@ void cProtocol_1_9_0::SendHealth(void)
+void cProtocol_1_9_0::SendHeldItemChange(int a_ItemIndex)
+{
+ ASSERT((a_ItemIndex >= 0) && (a_ItemIndex <= 8)); // Valid check
+
+ cPacketizer Pkt(*this, GetPacketId(sendHeldItemChange)); // Held item change
+ cPlayer * Player = m_Client->GetPlayer();
+ Pkt.WriteBEInt8(static_cast<Int8>(Player->GetInventory().GetEquippedSlotNum()));
+}
+
+
+
+
+
+
void cProtocol_1_9_0::SendHideTitle(void)
{
ASSERT(m_State == 3); // In game mode?