summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-10-02 15:22:17 +0200
committerpeterbell10 <peterbell10@live.co.uk>2020-10-03 17:54:14 +0200
commit21068011c6d8a4794eec86794d6b9612a265f03a (patch)
treef8c6bf1d8760a02945c0622ff2d237ff3b737030 /src/Protocol
parentFix instant mining of blocks not being recognised, tweak anti-cheat (#4938) (diff)
downloadcuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.gz
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.bz2
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.lz
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.xz
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.zst
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol.h2
-rw-r--r--src/Protocol/Protocol_1_8.cpp4
-rw-r--r--src/Protocol/Protocol_1_8.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Protocol/Protocol.h b/src/Protocol/Protocol.h
index 9d3cd77f2..cf3458040 100644
--- a/src/Protocol/Protocol.h
+++ b/src/Protocol/Protocol.h
@@ -440,7 +440,7 @@ public:
virtual void SendWholeInventory (const cWindow & a_Window) = 0;
virtual void SendWindowClose (const cWindow & a_Window) = 0;
virtual void SendWindowOpen (const cWindow & a_Window) = 0;
- virtual void SendWindowProperty (const cWindow & a_Window, short a_Property, short a_Value) = 0;
+ virtual void SendWindowProperty (const cWindow & a_Window, size_t a_Property, short a_Value) = 0;
/** Returns the ServerID used for authentication through session.minecraft.net */
virtual AString GetAuthServerID(void) = 0;
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index c6b21fc3d..ae3137eb6 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -1694,13 +1694,13 @@ void cProtocol_1_8_0::SendWindowOpen(const cWindow & a_Window)
-void cProtocol_1_8_0::SendWindowProperty(const cWindow & a_Window, short a_Property, short a_Value)
+void cProtocol_1_8_0::SendWindowProperty(const cWindow & a_Window, size_t a_Property, short a_Value)
{
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, pktWindowProperty);
Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID()));
- Pkt.WriteBEInt16(a_Property);
+ Pkt.WriteBEInt16(static_cast<Int16>(a_Property));
Pkt.WriteBEInt16(a_Value);
}
diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h
index ced7cf62a..44415758f 100644
--- a/src/Protocol/Protocol_1_8.h
+++ b/src/Protocol/Protocol_1_8.h
@@ -120,7 +120,7 @@ public:
virtual void SendWholeInventory (const cWindow & a_Window) override;
virtual void SendWindowClose (const cWindow & a_Window) override;
virtual void SendWindowOpen (const cWindow & a_Window) override;
- virtual void SendWindowProperty (const cWindow & a_Window, short a_Property, short a_Value) override;
+ virtual void SendWindowProperty (const cWindow & a_Window, size_t a_Property, short a_Value) override;
virtual AString GetAuthServerID(void) override { return m_AuthServerID; }