diff options
author | David Cole <40234707+DavidArthurCole@users.noreply.github.com> | 2024-10-03 08:34:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 14:34:40 +0200 |
commit | 7efb11313d70c65b8df6692ed237f137d4d346d1 (patch) | |
tree | 206da44a87d03bb516041e59bcd692986c11475f /src | |
parent | 4d4fbd019a58a694c0d36ae08d25a97c9db268d8 (diff) | |
download | skyhanni-7efb11313d70c65b8df6692ed237f137d4d346d1.tar.gz skyhanni-7efb11313d70c65b8df6692ed237f137d4d346d1.tar.bz2 skyhanni-7efb11313d70c65b8df6692ed237f137d4d346d1.zip |
Backend: Detekt Fixes Part 5 (#2617)
Diffstat (limited to 'src')
49 files changed, 85 insertions, 90 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt index 9da50e13e..4d7662b4f 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt @@ -182,7 +182,7 @@ object GetFromSackAPI { if (!amountString.isDouble()) return CommandResult.WRONG_AMOUNT to null val itemString = arguments.dropLast(1).joinToString(" ").uppercase().replace(':', '-') - val replacedString = itemString.replace("_"," ") + val replacedString = itemString.replace("_", " ") val item = when { SackAPI.sackListInternalNames.contains(itemString) -> itemString.asInternalName() diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index 1d8182328..3137458c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -421,7 +421,8 @@ enum class HotmData( val storage get() = ProfileStorageData.profileSpecific?.mining?.hotmTree - val abilities = listOf(PICKOBULUS, MINING_SPEED_BOOST, MANIAC_MINER, GEMSTONE_INFUSION, ANOMALOUS_DESIRE, SHEER_FORCE) + val abilities = + listOf(PICKOBULUS, MINING_SPEED_BOOST, MANIAC_MINER, GEMSTONE_INFUSION, ANOMALOUS_DESIRE, SHEER_FORCE) private val inventoryPattern by patternGroup.pattern( "inventory", diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index e392699cd..7581b3b1e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -412,5 +412,5 @@ enum class SackStatus { MISSING, CORRECT, ALRIGHT, - OUTDATED; + OUTDATED, } diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt index a763961f8..34f776308 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt @@ -126,7 +126,7 @@ object MobDetection { MobData.currentEntityLiving.clear() // Naturally removing the mobs using the despawn } - (MobData.currentEntityLiving - MobData.previousEntityLiving).forEach { addRetry(it) } // Spawn + (MobData.currentEntityLiving - MobData.previousEntityLiving).forEach { addRetry(it) } // Spawn (MobData.previousEntityLiving - MobData.currentEntityLiving).forEach { entityDeSpawn(it) } // Despawn MobData.notSeenMobs.removeIf(::canBeSeen) diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/GoalType.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/GoalType.kt index b2e4f6d8d..6dd666d4e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/GoalType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/goals/GoalType.kt @@ -3,5 +3,4 @@ package at.hannibal2.skyhanni.features.bingo.card.goals enum class GoalType { COMMUNITY, PERSONAL, - ; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ColorFormattingHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ColorFormattingHelper.kt index 9c7c03806..2987d95a6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ColorFormattingHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ColorFormattingHelper.kt @@ -21,7 +21,7 @@ object ColorFormattingHelper { "§f&k = Obfuscated (like this: §khellspawn§r)\n" + "§f&l = §lBold §r&m = §mStrikethrough \n" + "§f&o = §oItalic §r&n = §nUnderline\n" + - "§f&r = Reset\n"+ + "§f&r = Reset\n" + "§c===================================================" ) ) diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt index 1e0397959..624a2d0c2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt @@ -310,7 +310,8 @@ object PowderMiningChatFilter { return null } - private var rewardPatterns: Map<Pair<Pattern, PowderMiningFilterConfig.SimplePowderMiningRewardTypes>, String> = emptyMap() + private var rewardPatterns: Map<Pair<Pattern, PowderMiningFilterConfig.SimplePowderMiningRewardTypes>, String> = + emptyMap() @SubscribeEvent(priority = EventPriority.HIGHEST) fun onRepoReload(event: RepositoryReloadEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt index 3d46d3edc..0d542df38 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt @@ -21,7 +21,7 @@ enum class BossType( NETHER_VANQUISHER("§5Vanquisher", Type.VANQUISHER), END_ENDSTONE_PROTECTOR("§cEndstone Protector", Type.ENDERSTONE_PROTECTOR), - END_ENDER_DRAGON("Ender Dragon", Type.ENDER_DRAGON),// TODO fix totally + END_ENDER_DRAGON("Ender Dragon", Type.ENDER_DRAGON), // TODO fix totally SLAYER_ZOMBIE_1("§aRevenant Horror 1", Type.REVENANT_HORROR, "§aRev 1", showDeathTime = true), SLAYER_ZOMBIE_2("§eRevenant Horror 2", Type.REVENANT_HORROR, "§eRev 2", showDeathTime = true), @@ -107,7 +107,7 @@ enum class BossType( LEECH_SUPREME("§cLeech Supreme", Type.THE_RIFT_BOSSES), BACTE("§aBacte", Type.THE_RIFT_BOSSES), - WINTER_REINDRAKE("Reindrake", Type.REINDRAKE),// TODO fix totally + WINTER_REINDRAKE("Reindrake", Type.REINDRAKE), // TODO fix totally GARDEN_PEST_BEETLE("§cBeetle", Type.GARDEN_PESTS), GARDEN_PEST_CRICKET("§cCricket", Type.GARDEN_PESTS), diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt index b337d58b1..40e329f20 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt @@ -71,7 +71,8 @@ object GhostCounter { val config get() = SkyHanniMod.feature.combat.ghostCounter val storage get() = ProfileStorageData.profileSpecific?.ghostCounter private var display = emptyList<List<Any>>() - var ghostCounterV3File = File(FilenameUtils.separatorsToSystem("./config/ChatTriggers/modules/GhostCounterV3/.persistantData.json")) + var ghostCounterV3File = + File(FilenameUtils.separatorsToSystem("./config/ChatTriggers/modules/GhostCounterV3/.persistantData.json")) private val patternGroup = RepoPattern.group("combat.ghostcounter") private val skillXPPattern by patternGroup.pattern( diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt index 7c33afcdb..7d51994c0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt @@ -42,8 +42,7 @@ object MobHighlight { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.DARK_PURPLE.toColor().withAlpha(127) - ) - { config.corruptedMobHighlight } + ) { config.corruptedMobHighlight } } } @@ -57,16 +56,14 @@ object MobHighlight { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.DARK_BLUE.toColor().withAlpha(127) - ) - { config.arachneKeeperHighlight } + ) { config.arachneKeeperHighlight } } if (config.corleoneHighlighter && maxHealth == 1_000_000 && entity is EntityOtherPlayerMP && entity.name == "Team Treasurite") { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.DARK_PURPLE.toColor().withAlpha(127) - ) - { config.corleoneHighlighter } + ) { config.corleoneHighlighter } } if (entity is EntityEnderman) { @@ -78,8 +75,7 @@ object MobHighlight { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.DARK_AQUA.toColor().withAlpha(127) - ) - { config.zealotBruiserHighlighter } + ) { config.zealotBruiserHighlighter } } } @@ -89,8 +85,7 @@ object MobHighlight { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.GREEN.toColor().withAlpha(127) - ) - { config.chestZealotHighlighter } + ) { config.chestZealotHighlighter } } } @@ -99,8 +94,7 @@ object MobHighlight { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.DARK_RED.toColor().withAlpha(50) - ) - { config.specialZealotHighlighter } + ) { config.specialZealotHighlighter } } } @@ -153,12 +147,16 @@ object MobHighlight { } private fun markArachneMinis(entity: EntityLivingBase) { - RenderLivingEntityHelper.setEntityColorWithNoHurtTime(entity, LorenzColor.GOLD.toColor().withAlpha(50)) - { config.arachneBossHighlighter } + RenderLivingEntityHelper.setEntityColorWithNoHurtTime( + entity, + LorenzColor.GOLD.toColor().withAlpha(50) + ) { config.arachneBossHighlighter } } private fun markArachne(entity: EntityLivingBase) { - RenderLivingEntityHelper.setEntityColorWithNoHurtTime(entity, LorenzColor.RED.toColor().withAlpha(50)) - { config.arachneBossHighlighter } + RenderLivingEntityHelper.setEntityColorWithNoHurtTime( + entity, + LorenzColor.RED.toColor().withAlpha(50) + ) { config.arachneBossHighlighter } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt index f0ce80b1b..a5237aeb6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -194,10 +194,10 @@ object DungeonHideItems { if (isSkeletonSkull(entity)) { movingSkeletonSkulls[entity] = System.currentTimeMillis() - RenderLivingEntityHelper.setEntityColorWithNoHurtTime(entity, LorenzColor.GOLD.toColor().withAlpha(60)) - { - shouldColorMovingSkull(entity) - } + RenderLivingEntityHelper.setEntityColorWithNoHurtTime( + entity, + LorenzColor.GOLD.toColor().withAlpha(60) + ) { shouldColorMovingSkull(entity) } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt index 26b129dd9..15848a9bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt @@ -21,8 +21,10 @@ object HighlightDungeonDeathmite { val maxHealth = event.maxHealth if (entity is EntitySilverfish && maxHealth == 1_000_000_000) { - RenderLivingEntityHelper.setEntityColorWithNoHurtTime(entity, LorenzColor.DARK_RED.toColor().withAlpha(20)) - { SkyHanniMod.feature.dungeon.highlightDeathmites } + RenderLivingEntityHelper.setEntityColorWithNoHurtTime( + entity, + LorenzColor.DARK_RED.toColor().withAlpha(20) + ) { SkyHanniMod.feature.dungeon.highlightDeathmites } } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt index 9fbb3e527..7d2a6a457 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt @@ -213,7 +213,7 @@ object HoppityCollectionStats { val newItemStack = if (config.rarityDyeRecolor) ItemStack( Items.dye, 1, when (rarity) { - LorenzRarity.COMMON -> 7 // Light gray dye + LorenzRarity.COMMON -> 7 // Light gray dye LorenzRarity.UNCOMMON -> 10 // Lime dye LorenzRarity.RARE -> 4 // Lapis lazuli LorenzRarity.EPIC -> 5 // Purple dye diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index bdbe4cd7e..a69366931 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -25,7 +25,6 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.now import at.hannibal2.skyhanni.utils.SkyBlockTime import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.TimeUtils.format -import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Matcher import kotlin.time.Duration.Companion.minutes diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt index 80812c4c5..e41a61013 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt @@ -42,8 +42,9 @@ object FrozenTreasureTracker { private var icePerSecond = mutableListOf<Long>() private var icePerHour = 0 private var stoppedChecks = 0 - private val tracker = SkyHanniTracker("Frozen Treasure Tracker", { Data() }, { it.frozenTreasureTracker }) - { formatDisplay(drawDisplay(it)) } + private val tracker = SkyHanniTracker("Frozen Treasure Tracker", { Data() }, { it.frozenTreasureTracker }) { + formatDisplay(drawDisplay(it)) + } init { FrozenTreasure.entries.forEach { it.chatPattern } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt index 6831f1440..8250b023d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt @@ -91,7 +91,7 @@ object EasterEggWaypoints { /* Title: §e§lHYPIXEL - + '§703/14/24 §8L30A' ' ' 'Rank: §bMVP§d+§b' diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt index f050e56cd..ca8a73ce9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/SeaCreatureTracker.kt @@ -28,8 +28,9 @@ object SeaCreatureTracker { private val config get() = SkyHanniMod.feature.fishing.seaCreatureTracker - private val tracker = SkyHanniTracker("Sea Creature Tracker", { Data() }, { it.fishing.seaCreatureTracker }) - { drawDisplay(it) } + private val tracker = SkyHanniTracker("Sea Creature Tracker", { Data() }, { it.fishing.seaCreatureTracker }) { + drawDisplay(it) + } class Data : TrackerData() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt index 26e41f7ee..6cbda5b04 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/AnitaMedalProfit.kt @@ -38,7 +38,6 @@ object AnitaMedalProfit { GOLD("§6Gold medal", 8), SILVER("§fSilver medal", 2), BRONZE("§cBronze medal", 1), - ; } private fun getMedal(name: String) = MedalType.entries.firstOrNull { it.displayName == name } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt index 90c68a046..8a21525c1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt @@ -41,8 +41,9 @@ object ArmorDropTracker { private var hasArmor = false - private val tracker = SkyHanniTracker("Armor Drop Tracker", { Data() }, { it.garden.armorDropTracker }) - { drawDisplay(it) } + private val tracker = SkyHanniTracker("Armor Drop Tracker", { Data() }, { it.garden.armorDropTracker }) { + drawDisplay(it) + } class Data : TrackerData() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt index 9e9e3620b..af74da0d7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt @@ -31,8 +31,9 @@ object DicerRngDropTracker { private val itemDrops = mutableListOf<ItemDrop>() private val config get() = GardenAPI.config.dicerCounters - private val tracker = SkyHanniTracker("Dicer RNG Drop Tracker", { Data() }, { it.garden.dicerDropTracker }) - { drawDisplay(it) } + private val tracker = SkyHanniTracker("Dicer RNG Drop Tracker", { Data() }, { it.garden.dicerDropTracker }) { + drawDisplay(it) + } class Data : TrackerData() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt index 6ce5ebe06..06ff155b6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingDirection.kt @@ -3,5 +3,4 @@ package at.hannibal2.skyhanni.features.garden.farming.lane enum class FarmingDirection { NORTH_SOUTH, EAST_WEST, - ; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt index e407d0ad4..ce4ce6a9f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt @@ -49,7 +49,6 @@ object FarmingLaneFeatures { TOO_SLOW("§cToo slow!"), CALCULATING("§aCalculating.."), NORMAL(""), - ; } @HandleEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt index 52e49d26f..8cafd5260 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt @@ -56,7 +56,7 @@ object GardenVisitorCompactChat { ) private var visitorAcceptedChat = mutableListOf<String>() - private var visitorNameFormatted = ""; + private var visitorNameFormatted = "" private var rewardsList = mutableListOf<String>() @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt index 152fc1b7c..2ad6f56b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt @@ -196,7 +196,7 @@ object GardenVisitorDropStatistics { for (reward in VisitorReward.entries) { val count = rewardsCount[reward] ?: 0 - if (config.displayIcons) {// Icons + if (config.displayIcons) { // Icons val stack = reward.itemStack if (config.displayNumbersFirst) add(listOf("§b${count.addSeparators()} ", stack)) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt index d621aa081..1565d87d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt @@ -201,7 +201,7 @@ object VisitorAPI { val pricePerCopper = pricePerCopper ?: error("pricePerCopper is null") val totalPrice = totalPrice ?: error("totalPrice is null") val totalReward = totalReward ?: error("totalReward is null") - val loss = totalPrice - totalReward; + val loss = totalPrice - totalReward return when { preventRefusing && hasReward() != null -> VisitorBlockReason.RARE_REWARD preventRefusingNew && offersAccepted == 0 -> VisitorBlockReason.NEVER_ACCEPTED diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt index 802cc073b..6531d5158 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt @@ -373,9 +373,9 @@ private fun getWinterLines() = buildList { } private fun getWinterShowWhen(): Boolean = getSbLines().any { - SbPattern.winterEventStartPattern.matches(it) - || (SbPattern.winterNextWavePattern.matches(it) && !it.endsWith("Soon!")) - || SbPattern.winterWavePattern.matches(it) + SbPattern.winterEventStartPattern.matches(it) || + (SbPattern.winterNextWavePattern.matches(it) && !it.endsWith("Soon!")) || + SbPattern.winterWavePattern.matches(it) } private fun getNewYearLines() = listOf(getSbLines().first { SbPattern.newYearPattern.matches(it) }) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt index bd032fe66..50c5e446f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt @@ -230,13 +230,11 @@ object ChestValue { enum class SortType(val shortName: String, val longName: String) { PRICE_DESC("Price D", "Price Descending"), PRICE_ASC("Price A", "Price Ascending"), - ; } enum class FormatType(val type: String) { SHORT("Formatted"), LONG("Unformatted"), - ; } enum class DisplayType(val type: String) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt index d6d79b31a..dd9e3d91e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt @@ -111,7 +111,7 @@ object HarpFeatures { private fun updateScale() { if (Minecraft.getMinecraft().currentScreen == null) { - DelayedRun.runNextTick() { + DelayedRun.runNextTick { updateScale() } return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index 2e549313c..f8a16bf50 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -311,7 +311,7 @@ object HideNotClickableItems { "BRACELET", ) for (type in list) { - if (stack.getLore().any { it.contains("§l") && it.contains(type) }) {// todo use item api + if (stack.getLore().any { it.contains("§l") && it.contains(type) }) { // todo use item api showGreenLine = true return false } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt index 70069a84e..f1235a968 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt @@ -29,7 +29,6 @@ object QuickCraftFeatures { enum class InventoryType(val inventoryName: String) { CRAFT_ITEM("Craft Item"), MORE_QUICK_CRAFT_OPTIONS("Quick Crafting"), - ; } private fun InventoryType.ignoreSlot(slotNumber: Int?): Boolean = when (this) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt index 4856c65c1..1489ba83f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SackDisplay.kt @@ -299,20 +299,17 @@ object SackDisplay { STORED_ASC("Stored A", "Stored Ascending"), PRICE_DESC("Price D", "Price Descending"), PRICE_ASC("Price A", "Price Ascending"), - ; } enum class PriceFormat(val displayName: String) { - FORMATED("Formatted"), - UNFORMATED("Unformatted"), - ; + FORMATTED("Formatted"), + UNFORMATTED("Unformatted"), } enum class NumberFormat(val displayName: String) { DEFAULT("Default"), FORMATTED("Formatted"), UNFORMATTED("Unformatted"), - ; } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStrayTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStrayTracker.kt index 1aa9d068b..bb4eeaedb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStrayTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStrayTracker.kt @@ -125,8 +125,9 @@ object ChocolateFactoryStrayTracker { "(?:§.)*already have captured him before.*", ) - private val tracker = SkyHanniTracker("Stray Tracker", { Data() }, { it.chocolateFactory.strayTracker }) - { drawDisplay(it) } + private val tracker = SkyHanniTracker("Stray Tracker", { Data() }, { it.chocolateFactory.strayTracker }) { + drawDisplay(it) + } class Data : TrackerData() { override fun reset() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt index 207e1b92b..df408133a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt @@ -40,7 +40,7 @@ object CrownOfAvariceCounter { if (!config.enable) return null val item = InventoryUtils.getHelmet() if (item?.getInternalNameOrNull() != internalName) return null - val count = item.extraAttributes.getLong("collected_coins"); + val count = item.extraAttributes.getLong("collected_coins") return Renderable.horizontalContainer( listOf( Renderable.itemStack(internalName.getItemStack()), diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt index cc9f6b753..071c905d5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt @@ -53,7 +53,6 @@ object HighlightMiningCommissionMobs { CH_GOBLIN_SLAYER("Goblin Slayer", { it.name == "Weakling " }), // new commissions - ; } @SubscribeEvent @@ -67,8 +66,7 @@ object HighlightMiningCommissionMobs { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.YELLOW.toColor().withAlpha(127) - ) - { isEnabled() && type in active } + ) { isEnabled() && type in active } } } } @@ -99,8 +97,7 @@ object HighlightMiningCommissionMobs { RenderLivingEntityHelper.setEntityColorWithNoHurtTime( entity, LorenzColor.YELLOW.toColor().withAlpha(127) - ) - { isEnabled() && type in active } + ) { isEnabled() && type in active } } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index c3d307a16..da9dbb2fb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -140,7 +140,8 @@ object PowderTracker { } } - private val tracker = SkyHanniTracker("Powder Tracker", { Data() }, { it.powderTracker }) { formatDisplay(drawDisplay(it)) } + private val tracker = + SkyHanniTracker("Powder Tracker", { Data() }, { it.powderTracker }) { formatDisplay(drawDisplay(it)) } class Data : TrackerData() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt index 89db21304..61f9a3449 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt @@ -76,7 +76,6 @@ object NonGodPotEffectDisplay { CURSE_OF_GREED("§4Curse of Greed I"), COLD_RESISTANCE_4("§bCold Resistance IV"), - ; } private val effectsCountPattern by RepoPattern.pattern( diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt index 47472d2fe..82be48f80 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt @@ -344,5 +344,4 @@ enum class AutoStatus(val placeholderText: String, val correspondingDiscordStatu STACKING("Stacking placeholder (should never be visible)", DiscordStatus.STACKING), DUNGEONS("Dungeons placeholder (should never be visible)", DiscordStatus.DUNGEONS), AFK("This person is not afk (should never be visible)", DiscordStatus.AFK), - ; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 2f58a4fd1..62abb1c8c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -742,9 +742,12 @@ object EstimatedItemValueCalculator { val map = mutableMapOf<String, Double>() // todo use repo - val tieredEnchants = listOf("compact", "cultivating", "champion", "expertise", "hecatomb", "toxophilite") - val onlyTierOnePrices = listOf("ultimate_chimera", "ultimate_fatal_tempo", "smoldering", "ultimate_flash", "divine_gift") - val onlyTierFivePrices = listOf("ferocious_mana", "hardened_mana", "mana_vampire", "strong_mana") + val tieredEnchants = + listOf("compact", "cultivating", "champion", "expertise", "hecatomb", "toxophilite") + val onlyTierOnePrices = + listOf("ultimate_chimera", "ultimate_fatal_tempo", "smoldering", "ultimate_flash", "divine_gift") + val onlyTierFivePrices = + listOf("ferocious_mana", "hardened_mana", "mana_vampire", "strong_mana") val internalName = stack.getInternalName() for ((rawName, rawLevel) in enchantments) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt index 77807e5bf..50887554d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt @@ -91,11 +91,11 @@ object VoltHighlighter { FRIENDLY, HOSTILE, DOING_LIGHTNING, - ; } private fun getVoltState(itemStack: ItemStack): VoltState { return when (itemStack.getSkullTexture()) { + // TODO: Move these textures to the repo "ewogICJ0aW1lc3RhbXAiIDogMTY3Mzg4MzU3MjAzNSwKICAicHJvZmlsZUlkIiA6ICI0MDU4NDhjMmJjNTE0ZDhkOThkOTJkMGIwYzhiZDQ0YiIsCiAgInByb2ZpbGVOYW1lIiA6ICJMb3ZlT3dPIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2UxYjFiZmI1MzZiNjQxNmIyNmEyODNkMmQ4YWQ0YjE3NzFiYmU1Yjc2ODk2ZTI3MjdkNWU4MzNiYzg5NDk4MmQiLAogICAgICAibWV0YWRhdGEiIDogewogICAgICAgICJtb2RlbCIgOiAic2xpbSIKICAgICAgfQogICAgfQogIH0KfQ==" -> { VoltState.DOING_LIGHTNING } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt index ac12b43c0..c93932344 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt @@ -24,7 +24,7 @@ object RiftUpsideDownParkour { fun onRepoReload(event: RepositoryReloadEvent) { val data = event.getConstant<ParkourJson>("RiftUpsideDownParkour") parkourHelper = ParkourHelper( - data.locations.map { it.add(-1.0, -1.0, -1.0) },// TODO remove offset. change repo instead + data.locations.map { it.add(-1.0, -1.0, -1.0) }, // TODO remove offset. change repo instead data.shortCuts, platformSize = 2.0, detectionRange = 2.0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt index cedaa569b..0f397e6e3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt @@ -55,8 +55,9 @@ object VerminTracker { private val config get() = RiftAPI.config.area.westVillage.verminTracker - private val tracker = SkyHanniTracker("Vermin Tracker", { Data() }, { it.rift.verminTracker }) - { drawDisplay(it) } + private val tracker = SkyHanniTracker("Vermin Tracker", { Data() }, { it.rift.verminTracker }) { + drawDisplay(it) + } class Data : TrackerData() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt index 0fd24e25c..4798a9432 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt @@ -43,8 +43,10 @@ object SlayerMiniBossFeatures { if (bossType.clazz != entity.javaClass) continue miniBosses = miniBosses.editCopy { add(entity) } - RenderLivingEntityHelper.setEntityColorWithNoHurtTime(entity, LorenzColor.AQUA.toColor().withAlpha(127)) - { config.slayerMinibossHighlight } + RenderLivingEntityHelper.setEntityColorWithNoHurtTime( + entity, + LorenzColor.AQUA.toColor().withAlpha(127) + ) { config.slayerMinibossHighlight } } } @@ -79,6 +81,5 @@ object SlayerMiniBossFeatures { SVEN(EntityWolf::class.java, 45_000, 120_000, 480_000), VOIDLING(EntityEnderman::class.java, 8_400_000, 17_500_000, 52_500_000), INFERNAL(EntityBlaze::class.java, 12_000_000, 25_000_000, 75_000_000), - ; } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerType.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerType.kt index 75b1efd34..0a07e62fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerType.kt @@ -16,6 +16,6 @@ enum class SlayerType(val displayName: String, val rngName: String, val clazz: C ; companion object { - fun getByName(name: String): SlayerType? = entries.firstOrNull {name.contains(it.displayName)} + fun getByName(name: String): SlayerType? = entries.firstOrNull { name.contains(it.displayName) } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShield.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShield.kt index db3826d44..290f00678 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShield.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShield.kt @@ -14,5 +14,4 @@ enum class HellionShield( ASHEN("§8§lASHEN", "Ashen", LorenzColor.DARK_GRAY), SPIRIT("§f§lSPIRIT", "Spirit", LorenzColor.WHITE), CRYSTAL("§b§lCRYSTAL", "Crystal", LorenzColor.AQUA), - ; } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt index 198f7c0a0..281b744d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt @@ -38,6 +38,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent //#endif @SkyHanniModule +@Suppress("ImportOrdering") object EntityUtils { @Deprecated("Old. Instead use entity detection feature instead.") diff --git a/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveRecipe.kt b/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveRecipe.kt index f064183ba..24deb38a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveRecipe.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/PrimitiveRecipe.kt @@ -49,5 +49,4 @@ enum class RecipeType { KAT_UPGRADE, ESSENCE, CRAFTING, - ; } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt b/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt index 13aec1d92..968ad7fde 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/json/SkyHanniTypeAdapters.kt @@ -84,9 +84,7 @@ object SkyHanniTypeAdapters { } } - inline - - fun <reified T> GsonBuilder.registerTypeAdapter( + inline fun <reified T> GsonBuilder.registerTypeAdapter( crossinline write: (JsonWriter, T) -> Unit, crossinline read: (JsonReader) -> T, ): GsonBuilder { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt index f3f704f37..5362cc177 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt @@ -1139,6 +1139,7 @@ interface Renderable { GlStateManager.translate(0f, yShift.toFloat(), 0f) renderY += yShift } + @Suppress("SpacingAroundCurly") val range = yOffsets.indexOfFirst { it >= scroll.asInt() }..<(yOffsets.indexOfFirst { it >= end }.takeIf { it > 0 } ?: yOffsets.size) - 1 diff --git a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt index a6d42839c..eea93de04 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/tracker/SkyHanniTracker.kt @@ -198,7 +198,6 @@ open class SkyHanniTracker<Data : TrackerData>( TOTAL("Total"), SESSION("This Session"), MAYOR("This Mayor"), - ; } enum class DefaultDisplayMode(val display: String, val mode: DisplayMode?) { |