@@ -24,7 +24,7 @@ public class gpwsHud implements HudRenderCallback {
24
24
25
25
TextRenderer renderer ;
26
26
27
- int repeatTime = gpwsElytraClient .config .SoundDelay ;
27
+ int repeatTime = gpwsElytraClient .CONFIG .SoundDelay ;
28
28
29
29
String prevstate = "" ;
30
30
float lastPlayedSoundTime = 100 ;
@@ -88,28 +88,7 @@ public void renderText(DrawContext ctx, Text text, Color color, int x, int y) {
88
88
stack .pop ();
89
89
}
90
90
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
+
113
92
114
93
@ Override
115
94
public void onHudRender (DrawContext drawContext , float tickDelta ) {
0 commit comments