From 464cf91f4c88b9df7921e0e730ac638b356c7138 Mon Sep 17 00:00:00 2001 From: ModMaker101 <119018978+ModMaker101@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:28:37 -0500 Subject: [PATCH] Prevent door sounds from playing twice #392 (#425) --- Minecraft.Client/MultiPlayerGameMode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Minecraft.Client/MultiPlayerGameMode.cpp b/Minecraft.Client/MultiPlayerGameMode.cpp index e7611b37..9470a49a 100644 --- a/Minecraft.Client/MultiPlayerGameMode.cpp +++ b/Minecraft.Client/MultiPlayerGameMode.cpp @@ -370,7 +370,9 @@ bool MultiPlayerGameMode::useItemOn(shared_ptr player, Level *level, sha // are meant to be directly caused by this. If we don't do this, then the sounds never happen as the tile's use method is only called on the // server, and that won't allow any sounds that are directly made, or broadcast back level events to us that would make the sound, since we are // the source of the event. - if( ( t > 0 ) && ( !bTestUseOnly ) && player->isAllowedToUse(Tile::tiles[t]) ) + // --------------------------------------------------------------------------------- + // Only call soundOnly version if we didn't already call the tile's use method above + if( !didSomething && ( t > 0 ) && ( !bTestUseOnly ) && player->isAllowedToUse(Tile::tiles[t]) ) { Tile::tiles[t]->use(level, x, y, z, player, face, clickX, clickY, clickZ, true); }