diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index a0c0ebddf..e5c8787cf 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -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) diff --git a/Minecraft.World/AbstractContainerMenu.cpp b/Minecraft.World/AbstractContainerMenu.cpp index c98fc22c5..6dc55ee95 100644 --- a/Minecraft.World/AbstractContainerMenu.cpp +++ b/Minecraft.World/AbstractContainerMenu.cpp @@ -157,7 +157,7 @@ shared_ptr AbstractContainerMenu::clicked(int slotIndex, int butto shared_ptr clickedEntity = nullptr; shared_ptr 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 bool AbstractContainerMenu::isValidIngredient(shared_ptr item, int slotId) { return true; -} \ No newline at end of file +}