Shift click support

This commit is contained in:
BruceChen 2022-09-08 14:04:23 +08:00
parent 09b1d06bd1
commit 65bcd83330
8 changed files with 631 additions and 155 deletions

View file

@ -2634,7 +2634,7 @@ namespace MinecraftClient.Protocol.Handlers
catch (ObjectDisposedException) { return false; }
}
public bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item item, List<Tuple<short, Item>> changedSlots, int stateId)
public bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item? item, List<Tuple<short, Item?>> changedSlots, int stateId)
{
try
{
@ -2669,7 +2669,7 @@ namespace MinecraftClient.Protocol.Handlers
case WindowActionType.AddDragMiddle: button = 9; mode = 5; item = new Item(ItemType.Null, 0, null); break;
}
List<byte> packet = new List<byte>();
List<byte> packet = new();
packet.Add((byte)windowId); // Window ID
// 1.18+