aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/fishing
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-14 15:55:23 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-14 15:55:23 +0200
commit4d1fcf5b07f14d40b78e25ecf7fd0eabf5733864 (patch)
treeac689388ce9d814e586ee87fdb2620a765e14112 /src/main/java/at/hannibal2/skyhanni/features/fishing
parent18e399281bbfed824bd5eca4faae1985adb3a435 (diff)
downloadskyhanni-4d1fcf5b07f14d40b78e25ecf7fd0eabf5733864.tar.gz
skyhanni-4d1fcf5b07f14d40b78e25ecf7fd0eabf5733864.tar.bz2
skyhanni-4d1fcf5b07f14d40b78e25ecf7fd0eabf5733864.zip
Added Jacob's Contest Warning - Show a warning shortly before a new jacob contest starts.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/BarnFishingTimer.kt15
1 files changed, 1 insertions, 14 deletions
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()
}
}