mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Implement middle click
This commit is contained in:
parent
02d393fe4d
commit
1e5b9fc94b
3 changed files with 17 additions and 5 deletions
|
|
@ -1362,9 +1362,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
packet.AddRange(dataTypes.GetShort(actionNumber));
|
||||
|
||||
// Operation mode = 0 (default)
|
||||
byte mode = 0;
|
||||
if (buttom == 2) // middle-click mode is 3
|
||||
mode = 3;
|
||||
if (protocolversion >= MC19Version)
|
||||
packet.AddRange(dataTypes.GetVarInt(0));
|
||||
else packet.Add(0);
|
||||
packet.AddRange(dataTypes.GetVarInt(mode));
|
||||
else packet.Add(mode);
|
||||
|
||||
packet.AddRange(dataTypes.GetItemSlot(item));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue