From bae35a31e931db572c36a45876fb168ddc4f1f5f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 21 Oct 2023 13:58:30 +0200 Subject: code cleanup --- .../skyhanni/features/chat/playerchat/PlayerChatFilter.kt | 4 ++-- .../java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt | 2 -- .../skyhanni/features/garden/composter/ComposterOverlay.kt | 5 +++-- .../features/garden/visitor/GardenVisitorColorNames.kt | 2 +- .../nether/reputationhelper/CrimsonIsleReputationHelper.kt | 3 ++- .../nether/reputationhelper/dailyquest/QuestLoader.kt | 4 ++-- .../utils/jsonobjects/CrimsonIsleReputationJson.java | 12 ++++++------ 7 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src') 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("PlayerChatFilter") - for (category in data.filters) { + val playerChatFilter = event.getConstant("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() + private var visitorColours = mutableMapOf() // name -> color code var visitorItems = mutableMapOf>() @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): 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>() + val quests = mutableMapOf>() fun loadQuests(data: Map, 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 +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/CrimsonIsleReputationJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/CrimsonIsleReputationJson.java index 907081611..9235680fb 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/CrimsonIsleReputationJson.java +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/CrimsonIsleReputationJson.java @@ -10,19 +10,19 @@ public class CrimsonIsleReputationJson { public Map FISHING; @Expose - public Map RESCUE; + public Map RESCUE; @Expose - public Map FETCH; + public Map FETCH; @Expose - public Map DOJO; + public Map DOJO; @Expose - public Map MINIBOSS; + public Map MINIBOSS; @Expose - public Map KUUDRA; + public Map KUUDRA; public static class ReputationQuest { @Expose @@ -31,4 +31,4 @@ public class CrimsonIsleReputationJson { @Expose public List location; } -} \ No newline at end of file +} -- cgit