Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ IUIScene_AbstractContainerMenu::ESceneSection IUIScene_CreativeMenu::GetSectionA
bool IUIScene_CreativeMenu::handleValidKeyPress(int iPad, int buttonNum, BOOL quickKeyHeld)
{
// 4J Added - Make pressing the X button clear the hotbar
if(buttonNum == 1)
if(buttonNum == 1 && !m_bPointerOutsideMenu) // Don't clear the hotbar if pointer outside the menu, so handleOutsideClicked can drop the item
{
Minecraft *pMinecraft = Minecraft::GetInstance();
for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i)
Expand Down
4 changes: 2 additions & 2 deletions Minecraft.World/AbstractContainerMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -778,4 +778,4 @@ int AbstractContainerMenu::getRedstoneSignalFromContainer(shared_ptr<Container>
bool AbstractContainerMenu::isValidIngredient(shared_ptr<ItemInstance> item, int slotId)
{
return true;
}
}
Loading