From ec628846d2dbc65736f1c8bee90ff44a04e615e1 Mon Sep 17 00:00:00 2001 From: bibo38 Date: Thu, 25 Jun 2015 13:01:48 +0200 Subject: Fixed Middle-Click Button in the ClickWindow-Packet. See http://wiki.vg/Protocol#Click_Window The MiddleClick has the button 2 and not 0. Now you can max an item in an inventory in Creative mode, without inventory desync. Bugfix #2260 --- src/Protocol/Protocol17x.cpp | 2 +- src/Protocol/Protocol18x.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Protocol') diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 3d96071b5..c5c0f4a03 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -2374,7 +2374,7 @@ void cProtocol172::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer) case 0x0206: Action = caNumber7; break; case 0x0207: Action = caNumber8; break; case 0x0208: Action = caNumber9; break; - case 0x0300: Action = caMiddleClick; break; + case 0x0302: Action = caMiddleClick; break; case 0x0400: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caLeftClickOutsideHoldNothing : caDropKey; break; case 0x0401: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caRightClickOutsideHoldNothing : caCtrlDropKey; break; case 0x0500: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caLeftPaintBegin : caUnknown; break; diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp index 7cbabf806..d5dd328a4 100644 --- a/src/Protocol/Protocol18x.cpp +++ b/src/Protocol/Protocol18x.cpp @@ -2692,7 +2692,7 @@ void cProtocol180::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer) case 0x0206: Action = caNumber7; break; case 0x0207: Action = caNumber8; break; case 0x0208: Action = caNumber9; break; - case 0x0300: Action = caMiddleClick; break; + case 0x0302: Action = caMiddleClick; break; case 0x0400: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caLeftClickOutsideHoldNothing : caDropKey; break; case 0x0401: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caRightClickOutsideHoldNothing : caCtrlDropKey; break; case 0x0500: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caLeftPaintBegin : caUnknown; break; -- cgit v1.2.3