summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Protocol/Protocol_1_9.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index d1b717bd0..5c3be674f 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -63,6 +63,9 @@ Implements the 1.9 protocol classes:
/** The slot number that the client uses to indicate "outside the window". */
static const Int16 SLOT_NUM_OUTSIDE = -999;
+/** Value for main hand in Hand parameter for Protocol 1.9. */
+static const UInt32 MAIN_HAND = 0;
+
@@ -2665,8 +2668,11 @@ void cProtocol_1_9_0::HandlePacketUseEntity(cByteBuffer & a_ByteBuffer)
{
case 0:
{
- HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, Hand)
- m_Client->HandleUseEntity(EntityID, false);
+ HANDLE_READ(a_ByteBuffer, ReadVarInt, UInt32, Hand);
+ if (Hand == MAIN_HAND) // TODO: implement handling of off-hand actions; ignore them for now to avoid processing actions twice
+ {
+ m_Client->HandleUseEntity(EntityID, false);
+ }
break;
}
case 1: