1
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:
Shy
2025-11-23 16:23:25 +01:00
parent 79fa8f722b
commit ae172ac769
6 changed files with 270 additions and 76 deletions
@@ -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));
}
}