From 4d1fcf5b07f14d40b78e25ecf7fd0eabf5733864 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 14 Apr 2023 15:55:23 +0200 Subject: Added Jacob's Contest Warning - Show a warning shortly before a new jacob contest starts. --- .../skyhanni/features/fishing/BarnFishingTimer.kt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing') diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt index c534534a9..95bf9c30a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt @@ -5,12 +5,8 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.RenderUtils.renderString -import at.hannibal2.skyhanni.utils.SoundUtils.playSound import net.minecraft.client.Minecraft -import net.minecraft.client.audio.ISound -import net.minecraft.client.audio.PositionedSound import net.minecraft.entity.item.EntityArmorStand -import net.minecraft.util.ResourceLocation import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -23,15 +19,6 @@ class BarnFishingTimer { private var currentCount = 0 private var startTime = 0L - private val sound = object : PositionedSound(ResourceLocation("random.orb")) { - init { - volume = 50f - repeat = false - repeatDelay = 0 - attenuationType = ISound.AttenuationType.NONE - } - } - @SubscribeEvent fun onTick(event: TickEvent.ClientTickEvent) { if (event.phase != TickEvent.Phase.START) return @@ -55,7 +42,7 @@ class BarnFishingTimer { val duration = System.currentTimeMillis() - startTime val barnTimerAlertTime = SkyHanniMod.feature.fishing.barnTimerAlertTime * 1_000 if (duration > barnTimerAlertTime && duration < barnTimerAlertTime + 3_000) { - sound.playSound() + SoundUtils.playBeepSound() } } -- cgit