From 84c31a2331f7a0ec85b9d438992e244f60e5020f Mon Sep 17 00:00:00 2001 From: void_17 Date: Tue, 3 Mar 2026 02:01:12 +0700 Subject: [PATCH] Also remove clicking sound effect on empty container UI slots for rclick and middle mouse button click Tested by me so no PR and just push upstream --- .../UI/IUIScene_AbstractContainerMenu.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp index b6d1cc3c..cc1c1b82 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -1323,7 +1323,15 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b // Standard right click buttonNum = 1; quickKeyHeld = FALSE; - ui.PlayUISFX(eSFX_Press); + + if( IsSectionSlotList( m_eCurrSection ) ) + { + int currentIndex = getCurrentIndex( m_eCurrSection ) - getSectionStartOffset(m_eCurrSection); + + bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex); + if ( bSlotHasItem ) + ui.PlayUISFX(eSFX_Press); + } } break; case ACTION_MENU_Y: @@ -1342,7 +1350,14 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b // Shift and left click buttonNum = 0; quickKeyHeld = TRUE; - ui.PlayUISFX(eSFX_Press); + if( IsSectionSlotList( m_eCurrSection ) ) + { + int currentIndex = getCurrentIndex( m_eCurrSection ) - getSectionStartOffset(m_eCurrSection); + + bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex); + if ( bSlotHasItem ) + ui.PlayUISFX(eSFX_Press); + } } } break;