diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/rift/ShyCruxWarnings.kt | 13 |
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 |