mirror of
https://github.com/Shiewk/Widgets.git
synced 2026-04-28 11:34:17 +02:00
Reworked RGBAColorWidgetSetting & add sounds in widget settings
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package de.shiewk.widgets.utils;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.world.tick.TickManager;
|
||||
|
||||
import java.util.function.BooleanSupplier;
|
||||
@@ -29,4 +31,8 @@ public class WidgetUtils {
|
||||
return tickRate;
|
||||
}
|
||||
|
||||
public static void playSound(SoundEvent ev){
|
||||
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(ev, 1f, 1f));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user