Locks

Locks

8M Downloads

Locks always rattle regardless of whether a matching key is used or just a hand

Greg-21 opened this issue ยท 1 comments

commented

When you have a locked block (e.g. a chest), and then you use a matching key to open the lock, you hear two overlapping sounds instead of only one. Surprisingly it seems that "lock.open.ogg" starts first, followed by "lock.rattle.ogg", or at least that's the order of the subtitles.

I think it should work as follows:

if isMatchingKey then
    play "lock.open.ogg"
else
    play "lock.rattle.ogg"

I was able to reproduce this issue on the following configurations:

  • Minecraft versions: 1.16.1, 1.15.2, 1.14.4, 1.12.2
  • Locks versions: 2.5 for MC 1.16.1, 2.5 for MC 1.15.2, 2.5 for MC 1.14.4, 2.5 for MC 1.12.2
  • Forge versions: 32.0.75, 31.2.0, 28.2.0, 14.23.5.2854
commented

if isMatchingKey then play "lock.open.ogg" else play "lock.rattle.ogg"

not quite, how it works, but I'll try to fix it. Been on my mind for a while