Skip to content

Commit ac8ee50

Browse files
committed
Finish Mod and add volume config
1 parent e21e8a9 commit ac8ee50

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

src/client/java/com/carsoncoder/gpws/gpwsHud.java

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class gpwsHud implements HudRenderCallback {
2424

2525
TextRenderer renderer;
2626

27-
int repeatTime = gpwsElytraClient.config.SoundDelay;
27+
int repeatTime = gpwsElytraClient.CONFIG.SoundDelay;
2828

2929
String prevstate = "";
3030
float lastPlayedSoundTime = 100;
@@ -88,28 +88,7 @@ public void renderText(DrawContext ctx, Text text, Color color, int x, int y) {
8888
stack.pop();
8989
}
9090

91-
private void PlaySound(SoundEvent sound) {
92-
MinecraftClient.getInstance().getSoundManager().play(new EntityTrackingSoundInstance(
93-
sound,
94-
SoundCategory.VOICE,
95-
gpwsElytraClient.config.Volume,
96-
1f,
97-
MinecraftClient.getInstance().player,
98-
Random.create().nextLong()));
99-
// if (MinecraftClient.getInstance().player == null) {return;}
100-
// MinecraftClient.getInstance().world.playSound(
101-
// MinecraftClient.getInstance().player, // Player - if non-null, will play sound for every nearby player *except* the specified player
102-
// MinecraftClient.getInstance().player.getBlockPos(), // The position of where the sound will come from
103-
// SoundEvents.BLOCK_FENCE_GATE_OPEN, // The sound that will play
104-
// SoundCategory.BLOCKS, // This determines which of the volume sliders affect this sound
105-
// 1f, //Volume multiplier, 1 is normal, 0.5 is half volume, etc
106-
// 1f // Pitch multiplier, 1 is normal, 0.5 is half pitch, etc
107-
// );
108-
}
109-
110-
private void PlaySound(gpwsSounds.SOUNDS sound) {
111-
PlaySound(gpwsElytraClient.SOUNDS_MANAGER.GetSound(sound));
112-
}
91+
11392

11493
@Override
11594
public void onHudRender(DrawContext drawContext, float tickDelta) {

0 commit comments

Comments
 (0)