From 82091c2f3923933080f6a52461017132cedd792c Mon Sep 17 00:00:00 2001 From: Lord_Cambion Date: Mon, 30 Nov 2026 15:00:48 +0100 Subject: [PATCH 1/2] Fix: gamemode and difficulty slider sounds in host/player options Only play the sound when the slider value actually changes instead of on any slight movement. --- .../Common/UI/UIScene_InGameHostOptionsMenu.cpp | 16 ++++++++++++---- .../UI/UIScene_InGamePlayerOptionsMenu.cpp | 10 +++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp index 68a7a109..aec4d23b 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp @@ -369,11 +369,19 @@ void UIScene_InGameHostOptionsMenu::handleSliderMove(F64 sliderId, F64 currentVa case eControl_Difficulty: case eControl_GameMode: case eControl_Weather: - if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll); - m_bPendingSliderUpdate = true; - m_iPendingSliderId = id; - m_iPendingSliderValue = value; + { + int prevValue = m_bPendingSliderUpdate && m_iPendingSliderId == id ? m_iPendingSliderValue : (id == eControl_Difficulty ? m_iDifficulty : id == eControl_GameMode ? m_iGameType : m_iWeather); + + if (value != prevValue) + { + if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll); + m_bPendingSliderUpdate = true; + m_iPendingSliderId = id; + m_iPendingSliderValue = value; + } break; + + } } } diff --git a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp index f68acecb..2182afbf 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp @@ -422,9 +422,13 @@ void UIScene_InGamePlayerOptionsMenu::handleSliderMove(F64 sliderId, F64 current m_multiList.handleSliderMove(id, value); if (id == eControl_GameMode) { - if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll); - m_bPendingSliderUpdate = true; - m_iPendingSliderValue = value; + int prevValue = m_bPendingSliderUpdate ? m_iPendingSliderValue : m_iGameType; + if (value != prevValue) + { + if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll); + m_bPendingSliderUpdate = true; + m_iPendingSliderValue = value; + } } } From f799067d6302f7e74d909f1445523cc915b94c36 Mon Sep 17 00:00:00 2001 From: Lord_Cambion Date: Mon, 30 Nov 2026 18:13:47 +0100 Subject: [PATCH 2/2] Fix: boat sinking when non-air blocks are above water Use boat "status" instead of checking "materialAbove == Material::air" preventing boats from sinking when obstructed from above --- Minecraft.World/Boat.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Minecraft.World/Boat.cpp b/Minecraft.World/Boat.cpp index 5f7f5636..7ecf59a4 100644 --- a/Minecraft.World/Boat.cpp +++ b/Minecraft.World/Boat.cpp @@ -349,9 +349,8 @@ void Boat::floatBoat() int py = Mth::floor(bb->y0); int pz = Mth::floor(z); Material *material = level->getMaterial(px, py, pz); - Material *materialAbove = level->getMaterial(px, py + 1, pz); - if (material == Material::water && materialAbove == Material::air) + if (status == IN_WATER) { buoyancy = (1.0 - (bb->y0 - py)) * 0.9 + buoyancyOffset; rock = (sin(rockPhase) + 1.0) * 0.035; @@ -359,7 +358,7 @@ void Boat::floatBoat() invFriction = 0.9f; floating = true; } - else if (material == Material::water && materialAbove == Material::water) + else if (status == UNDER_WATER || status == UNDER_FLOWING_WATER) { buoyancy = 1.0; invFriction = 0.9f;