mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Fix dropping items outside menus
This commit is contained in:
parent
9e88dafef1
commit
62df888cb4
|
|
@ -157,7 +157,7 @@ shared_ptr<ItemInstance> AbstractContainerMenu::clicked(int slotIndex, int butto
|
|||
shared_ptr<ItemInstance> clickedEntity = nullptr;
|
||||
shared_ptr<Inventory> inventory = player->inventory;
|
||||
|
||||
if (slotIndex < 0 || slotIndex >= (int)slots.size())
|
||||
if ((slotIndex < 0 || slotIndex >= (int)slots.size()) && slotIndex != SLOT_CLICKED_OUTSIDE)
|
||||
return nullptr;
|
||||
|
||||
if (clickType == CLICK_QUICK_CRAFT)
|
||||
|
|
@ -778,4 +778,4 @@ int AbstractContainerMenu::getRedstoneSignalFromContainer(shared_ptr<Container>
|
|||
bool AbstractContainerMenu::isValidIngredient(shared_ptr<ItemInstance> item, int slotId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue