aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-04-04 05:12:18 +1100
committerGitHub <noreply@github.com>2024-04-03 20:12:18 +0200
commit7a6f576cbea6e37aeda014df40cfce69a0109a6c (patch)
tree552ebd6ec86e883b1f787b91069c148ce4914aa7 /src/main/java
parent5d2905197d6268a40325e9939a94a92cd8a94163 (diff)
downloadskyhanni-7a6f576cbea6e37aeda014df40cfce69a0109a6c.tar.gz
skyhanni-7a6f576cbea6e37aeda014df40cfce69a0109a6c.tar.bz2
skyhanni-7a6f576cbea6e37aeda014df40cfce69a0109a6c.zip
Fix: Don't check for thunder sparks when not needed (#1345)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt
index e49e8e3f8..a9fd806ac 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt
@@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.fishing
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
@@ -12,6 +13,7 @@ import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.RenderUtils.drawString
import at.hannibal2.skyhanni.utils.SpecialColour
import at.hannibal2.skyhanni.utils.getLorenzVec
@@ -31,7 +33,6 @@ class ThunderSparksHighlight {
fun onTick(event: LorenzTickEvent) {
if (!isEnabled()) return
-
EntityUtils.getEntities<EntityArmorStand>().filter {
it !in sparks && it.hasSkullTexture(texture)
}.forEach { sparks.add(it) }
@@ -65,9 +66,8 @@ class ThunderSparksHighlight {
sparks.clear()
}
- private fun isEnabled(): Boolean {
- return LorenzUtils.inSkyBlock && config.highlight
- }
+ private fun isEnabled() =
+ (IslandType.CRIMSON_ISLE.isInIsland() || LorenzUtils.isStrandedProfile) && config.highlight
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {