diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-16 15:25:25 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-16 15:25:25 +0100 |
commit | 6a9599fa9820b3efe0e5fdbb1d546ad8a0aa4de7 (patch) | |
tree | dd698965d468f2d905bace09d532f7b035c228ce /src/main/java/at | |
parent | 2eef43d6e941d5a2a57659a2d831f9276d25297e (diff) | |
download | skyhanni-6a9599fa9820b3efe0e5fdbb1d546ad8a0aa4de7.tar.gz skyhanni-6a9599fa9820b3efe0e5fdbb1d546ad8a0aa4de7.tar.bz2 skyhanni-6a9599fa9820b3efe0e5fdbb1d546ad8a0aa4de7.zip |
code cleanup
Diffstat (limited to 'src/main/java/at')
5 files changed, 15 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 964cd2181..b6d5ac924 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -111,6 +111,7 @@ import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowHelper import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowParticleFinder import at.hannibal2.skyhanni.features.event.diana.GriffinPetWarning import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare +import at.hannibal2.skyhanni.features.event.diana.MythologicalMobTracker import at.hannibal2.skyhanni.features.event.diana.SoopyGuessBurrow import at.hannibal2.skyhanni.features.event.jerry.HighlightInquisitors import at.hannibal2.skyhanni.features.event.jerry.HighlightJerries @@ -503,7 +504,8 @@ class SkyHanniMod { loadModule(StatsTuning()) loadModule(NonGodPotEffectDisplay()) loadModule(SoopyGuessBurrow()) - loadModule(DianaProfitTracker()) + loadModule(DianaProfitTracker) + loadModule(MythologicalMobTracker) loadModule(HighlightJerries()) loadModule(TheGreatSpook()) loadModule(GriffinBurrowHelper) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt index e585d8530..b65f4e510 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt @@ -139,5 +139,5 @@ class DianaProfitTracker { allowedDrops = event.getConstant<DianaDrops>("DianaDrops").diana_drops } - fun isEnabled() = DianaAPI.isDoingDiana() && config.enabled + private fun isEnabled() = DianaAPI.isDoingDiana() && config.enabled } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index f91d6f809..a305c7d5e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -98,7 +98,7 @@ object GriffinBurrowHelper { @SubscribeEvent fun onPlayerMove(event: EntityMoveEvent) { - if (!DianaAPI.isDoingDiana()) return + if (!isEnabled()) return if (event.distance > 10 && event.entity == Minecraft.getMinecraft().thePlayer) { teleportedLocation = event.newLocation } @@ -106,7 +106,7 @@ object GriffinBurrowHelper { @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { - if (!DianaAPI.isDoingDiana()) return + if (!isEnabled()) return if (event.message.startsWith("§c ☠ §r§7You were killed by §r")) { particleBurrows = particleBurrows.editCopy { keys.removeIf { this[it] == BurrowType.MOB } } } @@ -153,7 +153,7 @@ object GriffinBurrowHelper { @SubscribeEvent fun onRenderWorld(event: LorenzRenderWorldEvent) { - if (!DianaAPI.isDoingDiana()) return + if (!isEnabled()) return sendTip(event) val playerLocation = LocationUtils.playerLocation() @@ -280,4 +280,6 @@ object GriffinBurrowHelper { animation } } + + private fun isEnabled() = DianaAPI.isDoingDiana() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt index e71a7718b..04b78d035 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt @@ -25,7 +25,7 @@ class GriffinBurrowParticleFinder { @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true) fun onChatPacket(event: PacketEvent.ReceiveEvent) { - if (!DianaAPI.isDoingDiana()) return + if (!isEnabled()) return if (!config.burrowsSoopyGuess) return val packet = event.packet @@ -96,7 +96,7 @@ class GriffinBurrowParticleFinder { @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { - if (!DianaAPI.isDoingDiana()) return + if (!isEnabled()) return if (!config.burrowsSoopyGuess) return val message = event.message if (message.startsWith("§eYou dug out a Griffin Burrow!") || @@ -117,7 +117,7 @@ class GriffinBurrowParticleFinder { @SubscribeEvent fun onBlockClick(event: BlockClickEvent) { - if (!DianaAPI.isDoingDiana()) return + if (!isEnabled()) return if (!config.burrowsSoopyGuess) return val pos = event.position @@ -145,4 +145,6 @@ class GriffinBurrowParticleFinder { } } } + + private fun isEnabled() = DianaAPI.isDoingDiana() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt index cebf68a11..d7cbba03f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt @@ -259,7 +259,7 @@ object InquisitorWaypointShare { } } - fun isEnabled() = DianaAPI.isDoingDiana() && config.enabled + private fun isEnabled() = DianaAPI.isDoingDiana() && config.enabled fun maybeRemove(inquis: SharedInquisitor) { if (inquisitorsNearby.isEmpty()) { |