aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-06-28 08:27:36 +1000
committerGitHub <noreply@github.com>2023-06-28 00:27:36 +0200
commitd40f64e8a3bf305c016e9c16f73a93723b0254b2 (patch)
treee0eeecf69c25ba282f946687d4057d8e9bbc1ef3 /src
parent8df02962e28435dcc70861b73e14b4005f3c7eec (diff)
downloadskyhanni-d40f64e8a3bf305c016e9c16f73a93723b0254b2.tar.gz
skyhanni-d40f64e8a3bf305c016e9c16f73a93723b0254b2.tar.bz2
skyhanni-d40f64e8a3bf305c016e9c16f73a93723b0254b2.zip
Merge pull request #269
* fix
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/ShyCruxWarnings.kt13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/ShyCruxWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/ShyCruxWarnings.kt
index 0b7f60d30..a8b46741e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/ShyCruxWarnings.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/ShyCruxWarnings.kt
@@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.features.rift
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.TitleUtils
import at.hannibal2.skyhanni.events.LorenzTickEvent
-import at.hannibal2.skyhanni.test.command.CopyErrorCommand
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -13,20 +12,16 @@ class ShyCruxWarnings {
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
+ if (!RiftAPI.inRift() || !SkyHanniMod.feature.rift.crux.shyWarning) return
if (event.isMod(2)) {
checkForShy()
}
}
private fun checkForShy() {
- try {
- if (!(RiftAPI.inRift() || !SkyHanniMod.feature.rift.crux.shyWarning)) return
- val list = Minecraft.getMinecraft().theWorld?.getLoadedEntityList() ?: return
- if (list.any { it.name in shyNames && it.distanceToPlayer() < 8 }) {
- TitleUtils.sendTitle("§eLook away!", 250)
- }
- } catch (e: Throwable) {
- CopyErrorCommand.logError(e, "Check for Shy failed")
+ val list = Minecraft.getMinecraft().theWorld?.getLoadedEntityList() ?: return
+ if (list.any { it.name in shyNames && it.distanceToPlayer() < 8 }) {
+ TitleUtils.sendTitle("§eLook away!", 150)
}
}
} \ No newline at end of file