diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-21 13:58:30 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-21 13:58:30 +0200 |
commit | bae35a31e931db572c36a45876fb168ddc4f1f5f (patch) | |
tree | d14ea6d1694a98158351f143ff22edf84bb432fa /src/main/java/at/hannibal2/skyhanni/features | |
parent | 526365859a27d54b7ea5c07c08b301650c15ea0e (diff) | |
download | skyhanni-bae35a31e931db572c36a45876fb168ddc4f1f5f.tar.gz skyhanni-bae35a31e931db572c36a45876fb168ddc4f1f5f.tar.bz2 skyhanni-bae35a31e931db572c36a45876fb168ddc4f1f5f.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
6 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatFilter.kt index e4db8ee3b..9501b9d49 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatFilter.kt @@ -30,8 +30,8 @@ class PlayerChatFilter { var countCategories = 0 var countFilters = 0 - val data = event.getConstant<PlayerChatFilterJson>("PlayerChatFilter") - for (category in data.filters) { + val playerChatFilter = event.getConstant<PlayerChatFilterJson>("PlayerChatFilter") + for (category in playerChatFilter.filters) { val description = category.description val filter = MultiFilter() filter.load(category) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt index d114d2455..49eae1427 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt @@ -1,7 +1,6 @@ package at.hannibal2.skyhanni.features.garden import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.data.GardenCropMilestones import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.BlockClickEvent @@ -21,7 +20,6 @@ import at.hannibal2.skyhanni.features.garden.farming.GardenBestCropTime import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI import at.hannibal2.skyhanni.features.garden.inventory.SkyMartCopperPrice -import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI import at.hannibal2.skyhanni.utils.BlockUtils.isBabyCrop import at.hannibal2.skyhanni.utils.InventoryUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt index 88695da9a..72845cc63 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt @@ -94,7 +94,6 @@ object ComposterOverlay { LorenzUtils.chat("§e[SkyHanni] Composter test offset set to $testOffset.") } - @SubscribeEvent fun onInventoryClose(event: InventoryCloseEvent) { inInventory = false @@ -460,7 +459,9 @@ object ComposterOverlay { if (sackStatus == SackStatus.MISSING || sackStatus == SackStatus.OUTDATED) { if (sackStatus == SackStatus.OUTDATED) LorenzUtils.sendCommandToServer("gfs $internalName ${itemsNeeded - having}") - val sackType = if (internalName == "VOLTA" || internalName == "OIL_BARREL") "Mining" else "Enchanted Agronomy" // TODO Add sack type repo data + // TODO Add sack type repo data + val sackType = if (internalName == "VOLTA" || internalName == "OIL_BARREL") "Mining" + else "Enchanted Agronomy" LorenzUtils.clickableChat( "§e[SkyHanni] Sacks could not be loaded. Click here and open your §9$sackType Sack §eto update the data!", "sax" diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt index 16efb90b1..8096b747c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorColorNames.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.utils.jsonobjects.GardenJson import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object GardenVisitorColorNames { - private var visitorColours = mutableMapOf<String, String>() + private var visitorColours = mutableMapOf<String, String>() // name -> color code var visitorItems = mutableMapOf<String, List<String>>() @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt index 7e9690a2e..c689aadc2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt @@ -155,7 +155,8 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) { fun readLocationData(locations: List<Double>): LorenzVec? { if (locations.isEmpty()) return null - return LorenzVec(locations[0] - 1, locations[1], locations[2] - 1) + val (x, y, z) = locations + return LorenzVec(x, y, z).add(-1, 0, -1) } fun showLocations() = when (config.showLocation) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt index a35510196..6900e8c2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt @@ -20,7 +20,7 @@ import at.hannibal2.skyhanni.utils.jsonobjects.CrimsonIsleReputationJson.Reputat class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { companion object { - val quests = mutableMapOf<String, Pair<String,ReputationQuest>>() + val quests = mutableMapOf<String, Pair<String, ReputationQuest>>() fun loadQuests(data: Map<String, ReputationQuest>, questType: String) { for ((questName, questInfo) in data) { quests[questName] = Pair(questType, questInfo) @@ -174,4 +174,4 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { dailyQuestHelper.reputationHelper.reset() } } -}
\ No newline at end of file +} |