mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
parent
d8afda34fb
commit
2fd610aa65
1 changed files with 10 additions and 4 deletions
|
|
@ -1720,14 +1720,20 @@ namespace MinecraftClient
|
||||||
/// <param name="item">Item (may be null for empty slot)</param>
|
/// <param name="item">Item (may be null for empty slot)</param>
|
||||||
public void OnSetSlot(byte inventoryID, short slotID, Item item)
|
public void OnSetSlot(byte inventoryID, short slotID, Item item)
|
||||||
{
|
{
|
||||||
|
// Handle inventoryID -2 - Add item to player inventory without animation
|
||||||
|
if (inventoryID == 254)
|
||||||
|
inventoryID = 0;
|
||||||
// Handle cursor item
|
// Handle cursor item
|
||||||
if (inventoryID == 255 && slotID == -1)
|
if (inventoryID == 255 && slotID == -1)
|
||||||
|
{
|
||||||
|
if (inventories.ContainsKey(0))
|
||||||
{
|
{
|
||||||
if (item != null)
|
if (item != null)
|
||||||
inventories[0].Items[-1] = item;
|
inventories[0].Items[-1] = item;
|
||||||
else
|
else
|
||||||
inventories[0].Items.Remove(-1);
|
inventories[0].Items.Remove(-1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (inventories.ContainsKey(inventoryID))
|
if (inventories.ContainsKey(inventoryID))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue