From c834eceec74a9428cf1080b5b57cfcc9fdd4225e Mon Sep 17 00:00:00 2001 From: Vitaly Date: Thu, 4 Jan 2024 05:55:09 +0530 Subject: [PATCH] fix: block break sound wasnt respecting position --- src/soundSystem.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/soundSystem.ts b/src/soundSystem.ts index 773d2be8..c63c1575 100644 --- a/src/soundSystem.ts +++ b/src/soundSystem.ts @@ -8,6 +8,7 @@ import { options } from './optionsStorage' import { loadOrPlaySound } from './basicSounds' subscribeKey(miscUiState, 'gameLoaded', async () => { + if (!miscUiState.gameLoaded) return const soundsLegacyMap = window.allSoundsVersionedMap as Record const allSoundsMap = window.allSoundsMap as Record> const allSoundsMeta = window.allSoundsMeta as { format: string, baseUrl: string } @@ -182,7 +183,7 @@ subscribeKey(miscUiState, 'gameLoaded', async () => { }) bot.on('diggingCompleted', async () => { if (diggingBlock) { - await playBlockBreak(diggingBlock.name) + await playBlockBreak(diggingBlock.name, diggingBlock.position) } }) }