mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Complete inventory clicking mechanism
Update player inventory and opened container after clicking on slots
This commit is contained in:
parent
855bdade0b
commit
93b72eb83e
2 changed files with 145 additions and 13 deletions
|
|
@ -1577,18 +1577,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
button = 0;
|
||||
mode = 4;
|
||||
item = new Item(-1, 0, null);
|
||||
Container inventory = handler.GetInventory(windowId);
|
||||
if (inventory.Items.ContainsKey(slotId))
|
||||
inventory.Items[slotId].Count--; // server won't update us after dropped
|
||||
if (inventory.Items[slotId].Count == 0)
|
||||
inventory.Items.Remove(slotId);
|
||||
break;
|
||||
case WindowActionType.DropItemStack:
|
||||
button = 1;
|
||||
mode = 4;
|
||||
item = new Item(-1, 0, null);
|
||||
inventory = handler.GetInventory(windowId);
|
||||
inventory.Items.Remove(slotId); // server won't update us after dropped
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue