fix: Mined sound

This commit is contained in:
Jakub Žitník 2025-03-28 15:30:03 +01:00
parent 25fb664b8d
commit e58c7be90d
Signed by: jzitnik
GPG Key ID: C577A802A6AF4EF3
2 changed files with 4 additions and 5 deletions

View File

@ -310,7 +310,7 @@ public class Game extends AutoTransientSupport {
for (Block block : blocksCopy) { for (Block block : blocksCopy) {
if (block.getClass().isAnnotationPresent(MineSound.class)) { if (block.getClass().isAnnotationPresent(MineSound.class)) {
new Thread(() -> { new Thread(() -> {
var anot = block.getClass().getAnnotation(MiningSound.class); var anot = block.getClass().getAnnotation(MineSound.class);
gameStates.dependencies.sound.playSound(configuration, anot.value(), anot.annotationType()); gameStates.dependencies.sound.playSound(configuration, anot.value(), anot.annotationType());
}).start(); }).start();
} }

View File

@ -4,11 +4,10 @@ import lombok.Getter;
@Getter @Getter
public enum SoundType { public enum SoundType {
BLOCK(0), BLOCK(100),
WALKING(100), WALKING(15),
MINING(100); MINING(25);
// TODO: Volume is not currently used but will be probably used in future to better normalize the sound volume
private final int volume; private final int volume;
SoundType(int volume) { SoundType(int volume) {