From dc619eea46194955ede129b6a7125be2c1e8fa74 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:49:47 +1000 Subject: Backend: Classes -> Objects with annotation (#1982) Co-authored-by: ThatGravyBoat --- .../skyhanni/features/anvil/AnvilCombineHelper.kt | 4 +- .../skyhanni/features/bingo/CompactBingoChat.kt | 4 +- .../skyhanni/features/bingo/MinionCraftHelper.kt | 4 +- .../features/bingo/card/BingoCardReader.kt | 4 +- .../skyhanni/features/bingo/card/BingoCardTips.kt | 4 +- .../features/chat/ArachneChatMessageHider.kt | 4 +- .../hannibal2/skyhanni/features/chat/ChatFilter.kt | 4 +- .../features/chat/CompactBestiaryChatMessage.kt | 4 +- .../features/chat/CompactSplashPotionMessage.kt | 4 +- .../skyhanni/features/chat/PlayerDeathMessages.kt | 4 +- .../skyhanni/features/chat/RareDropMessages.kt | 4 +- .../skyhanni/features/chat/SkyblockXPInChat.kt | 4 +- .../features/chat/playerchat/PlayerChatModifier.kt | 5 +- .../skyhanni/features/combat/FerocityDisplay.kt | 5 +- .../skyhanni/features/combat/HideDamageSplash.kt | 4 +- .../features/combat/mobs/AreaMiniBossFeatures.kt | 4 +- .../combat/mobs/AshfangMinisNametagHider.kt | 4 +- .../skyhanni/features/combat/mobs/MobHighlight.kt | 4 +- .../skyhanni/features/combat/mobs/SpawnTimers.kt | 6 +- .../features/commands/SendCoordinatedCommand.kt | 4 +- .../skyhanni/features/commands/WarpIsCommand.kt | 4 +- .../skyhanni/features/cosmetics/ArrowTrail.kt | 4 +- .../features/cosmetics/CosmeticFollowingLine.kt | 4 +- .../features/dungeon/DungeonArchitectFeatures.kt | 4 +- .../dungeon/DungeonBossHideDamageSplash.kt | 4 +- .../features/dungeon/DungeonBossMessages.kt | 4 +- .../skyhanni/features/dungeon/DungeonChatFilter.kt | 4 +- .../skyhanni/features/dungeon/DungeonCleanEnd.kt | 4 +- .../skyhanni/features/dungeon/DungeonCopilot.kt | 4 +- .../features/dungeon/DungeonDeathCounter.kt | 4 +- .../features/dungeon/DungeonFinderFeatures.kt | 4 +- .../skyhanni/features/dungeon/DungeonHideItems.kt | 36 ++++---- .../dungeon/DungeonHighlightClickedBlocks.kt | 4 +- .../features/dungeon/DungeonRankTabListColor.kt | 4 +- .../dungeon/DungeonShadowAssassinNotification.kt | 4 +- .../features/dungeon/DungeonTeammateOutlines.kt | 4 +- .../skyhanni/features/dungeon/DungeonsRaceGuide.kt | 4 +- .../features/dungeon/HighlightDungeonDeathmite.kt | 4 +- .../skyhanni/features/dungeon/TerracottaPhase.kt | 4 +- .../skyhanni/features/event/diana/DianaFixChat.kt | 4 +- .../features/event/diana/GriffinPetWarning.kt | 4 +- .../features/event/diana/HighlightInquisitors.kt | 4 +- .../features/event/diana/SoopyGuessBurrow.kt | 4 +- .../features/event/jerry/HighlightJerries.kt | 4 +- .../lobby/waypoints/christmas/PresentWaypoints.kt | 4 +- .../lobby/waypoints/easter/EasterEggWaypoints.kt | 4 +- .../lobby/waypoints/halloween/BasketWaypoints.kt | 4 +- .../skyhanni/features/event/spook/TheGreatSpook.kt | 4 +- .../skyhanni/features/event/winter/JyrreTimer.kt | 4 +- .../features/event/winter/NewYearCakeReminder.kt | 4 +- .../skyhanni/features/fishing/ChumBucketHider.kt | 4 +- .../features/fishing/FishingBaitWarnings.kt | 4 +- .../features/fishing/FishingHookDisplay.kt | 12 +-- .../skyhanni/features/fishing/FishingTimer.kt | 4 +- .../features/fishing/SeaCreatureFeatures.kt | 4 +- .../fishing/SeaCreatureMessageShortener.kt | 4 +- .../skyhanni/features/fishing/SharkFishCounter.kt | 4 +- .../features/fishing/ShowFishingItemName.kt | 4 +- .../features/fishing/ThunderSparksHighlight.kt | 8 +- .../skyhanni/features/fishing/TotemOfCorruption.kt | 8 +- .../features/fishing/trophy/GeyserFishing.kt | 4 +- .../features/fishing/trophy/OdgerWaypoint.kt | 4 +- .../features/fishing/trophy/TrophyFishFillet.kt | 4 +- .../features/fishing/trophy/TrophyFishMessages.kt | 4 +- .../features/garden/AtmosphericFilterDisplay.kt | 4 +- .../features/garden/GardenCropMilestoneFix.kt | 4 +- .../skyhanni/features/garden/GardenLevelDisplay.kt | 4 +- .../skyhanni/features/garden/GardenOptimalSpeed.kt | 4 +- .../skyhanni/features/garden/GardenWarpCommands.kt | 4 +- .../skyhanni/features/garden/GardenYawAndPitch.kt | 4 +- .../skyhanni/features/garden/ToolTooltipTweaks.kt | 13 +-- .../features/garden/composter/ComposterDisplay.kt | 6 +- .../garden/composter/ComposterInventoryNumbers.kt | 4 +- .../composter/GardenComposterInventoryFeatures.kt | 4 +- .../garden/contest/JacobContestFFNeededDisplay.kt | 4 +- .../garden/contest/JacobContestStatsSummary.kt | 4 +- .../garden/contest/JacobContestTimeNeeded.kt | 4 +- .../contest/JacobFarmingContestsInventory.kt | 4 +- .../farming/GardenBurrowingSporesNotifier.kt | 4 +- .../farming/WildStrawberryDyeNotification.kt | 4 +- .../garden/farming/WrongFungiCutterWarning.kt | 4 +- .../garden/inventory/AnitaExtraFarmingFortune.kt | 4 +- .../inventory/GardenCropMilestoneInventory.kt | 4 +- .../garden/inventory/GardenInventoryNumbers.kt | 4 +- .../inventory/GardenInventoryTooltipOverflow.kt | 4 +- .../features/garden/inventory/LogBookStats.kt | 4 +- .../garden/inventory/plots/GardenNextPlotPrice.kt | 4 +- .../inventory/plots/GardenPlotMenuHighlighting.kt | 4 +- .../features/garden/pests/PestParticleLine.kt | 4 +- .../features/garden/pests/PestParticleWaypoint.kt | 4 +- .../skyhanni/features/garden/pests/PestSpawn.kt | 4 +- .../skyhanni/features/garden/pests/SprayDisplay.kt | 4 +- .../features/garden/pests/SprayFeatures.kt | 6 +- .../features/garden/pests/StereoHarmonyDisplay.kt | 8 +- .../garden/visitor/GardenVisitorSupercraft.kt | 6 +- .../features/garden/visitor/GardenVisitorTimer.kt | 10 +-- .../visitor/HighlightVisitorsOutsideOfGarden.kt | 4 +- .../features/garden/visitor/VisitorListener.kt | 10 +-- .../garden/visitor/VisitorRewardWarning.kt | 4 +- .../skyhanni/features/gui/MovableHotBar.kt | 4 +- .../skyhanni/features/gui/quiver/QuiverDisplay.kt | 4 +- .../skyhanni/features/gui/quiver/QuiverWarning.kt | 4 +- .../skyhanni/features/inventory/ChestValue.kt | 4 +- .../skyhanni/features/inventory/DojoRankDisplay.kt | 4 +- .../features/inventory/HideNotClickableItems.kt | 4 +- .../skyhanni/features/inventory/ItemStars.kt | 4 +- .../skyhanni/features/inventory/MaxPurseItems.kt | 4 +- .../features/inventory/PowerStoneGuideFeatures.kt | 4 +- .../features/inventory/QuickCraftFeatures.kt | 4 +- .../features/inventory/RngMeterInventory.kt | 4 +- .../features/inventory/ShiftClickBrewing.kt | 4 +- .../features/inventory/ShiftClickEquipment.kt | 4 +- .../skyhanni/features/inventory/StatsTuning.kt | 6 +- .../features/inventory/SuperpairsClicksAlert.kt | 4 +- .../auctionhouse/AuctionHouseCopyUnderbidPrice.kt | 4 +- .../auctionhouse/AuctionHouseOpenPriceWebsite.kt | 4 +- .../inventory/bazaar/BazaarBestSellMethod.kt | 4 +- .../bazaar/BazaarCancelledBuyOrderClipboard.kt | 4 +- .../inventory/bazaar/BazaarOpenPriceWebsite.kt | 4 +- .../inventory/bazaar/CraftMaterialsFromBazaar.kt | 4 +- .../chocolatefactory/ChocolateFactoryShortcut.kt | 4 +- .../features/inventory/tiarelay/TiaRelayHelper.kt | 4 +- .../inventory/tiarelay/TiaRelayWaypoints.kt | 4 +- .../features/itemabilities/ChickenHeadTimer.kt | 4 +- .../itemabilities/FireVeilWandParticles.kt | 4 +- .../abilitycooldown/ItemAbilityCooldown.kt | 4 +- .../skyhanni/features/mining/ColdOverlay.kt | 4 +- .../skyhanni/features/mining/DeepCavernsGuide.kt | 4 +- .../features/mining/GoldenGoblinHighlight.kt | 4 +- .../mining/HighlightMiningCommissionMobs.kt | 9 +- .../skyhanni/features/mining/HotmFeatures.kt | 8 +- .../skyhanni/features/mining/TunnelsMaps.kt | 4 +- .../crystalhollows/CrystalHollowsNamesInCore.kt | 4 +- .../mining/crystalhollows/CrystalHollowsWalls.kt | 97 +++++++++++----------- .../fossilexcavator/ExcavatorProfitTracker.kt | 4 +- .../fossilexcavator/GlacitePowderFeatures.kt | 4 +- .../mining/fossilexcavator/ProfitPerExcavation.kt | 4 +- .../features/mining/mineshaft/CorpseAPI.kt | 4 +- .../mining/mineshaft/MineshaftCorpseProfitPer.kt | 4 +- .../features/minion/InfernoMinionFeatures.kt | 4 +- .../skyhanni/features/minion/MinionCollectLogic.kt | 4 +- .../hannibal2/skyhanni/features/minion/MinionXp.kt | 4 +- .../features/misc/AuctionHousePriceComparison.kt | 4 +- .../skyhanni/features/misc/BetterSignEditing.kt | 4 +- .../skyhanni/features/misc/BetterWikiFromMenus.kt | 4 +- .../skyhanni/features/misc/BrewingStandOverlay.kt | 4 +- .../skyhanni/features/misc/ButtonOnPause.kt | 4 +- .../skyhanni/features/misc/CurrentPetDisplay.kt | 4 +- .../skyhanni/features/misc/CustomTextBox.kt | 4 +- .../skyhanni/features/misc/ExpOrbsOnGroundHider.kt | 6 +- .../skyhanni/features/misc/FixNEUHeavyPearls.kt | 6 +- .../hannibal2/skyhanni/features/misc/HideArmor.kt | 4 +- .../skyhanni/features/misc/HideFarEntities.kt | 4 +- .../skyhanni/features/misc/InGameDateDisplay.kt | 4 +- .../skyhanni/features/misc/JoinCrystalHollows.kt | 4 +- .../skyhanni/features/misc/LesserOrbHider.kt | 8 +- .../skyhanni/features/misc/MarkedPlayerManager.kt | 2 + .../features/misc/NonGodPotEffectDisplay.kt | 4 +- .../skyhanni/features/misc/ParticleHider.kt | 4 +- .../skyhanni/features/misc/PartyMemberOutlines.kt | 4 +- .../features/misc/PatcherSendCoordinates.kt | 4 +- .../skyhanni/features/misc/PetCandyUsedDisplay.kt | 4 +- .../skyhanni/features/misc/PetExpTooltip.kt | 20 +++-- .../skyhanni/features/misc/PetItemDisplay.kt | 4 +- .../features/misc/PocketSackInASackDisplay.kt | 10 ++- .../features/misc/PrivateIslandNoPickaxeAbility.kt | 6 +- .../skyhanni/features/misc/ReplaceRomanNumerals.kt | 4 +- .../misc/RestorePieceOfWizardPortalLore.kt | 4 +- .../skyhanni/features/misc/SkyBlockKickDuration.kt | 4 +- .../skyhanni/features/misc/TabWidgetSettings.kt | 6 +- .../skyhanni/features/misc/TimeFeatures.kt | 4 +- .../hannibal2/skyhanni/features/misc/TpsCounter.kt | 21 +++-- .../features/misc/items/EstimatedWardrobePrice.kt | 4 +- .../features/misc/items/GlowingDroppedItems.kt | 4 +- .../misc/teleportpad/TeleportPadCompactName.kt | 4 +- .../misc/teleportpad/TeleportPadInventoryNumber.kt | 4 +- .../skyhanni/features/nether/MatriarchHelper.kt | 4 +- .../skyhanni/features/nether/PabloHelper.kt | 4 +- .../skyhanni/features/nether/SulphurSkitterBox.kt | 14 ++-- .../features/nether/VolcanoExplosivityDisplay.kt | 6 +- .../features/nether/ashfang/AshfangBlazes.kt | 4 +- .../features/nether/ashfang/AshfangBlazingSouls.kt | 8 +- .../features/nether/ashfang/AshfangGravityOrbs.kt | 8 +- .../nether/ashfang/AshfangHideDamageIndicator.kt | 4 +- .../nether/ashfang/AshfangHideParticles.kt | 4 +- .../nether/ashfang/AshfangNextResetCooldown.kt | 4 +- .../rift/area/colosseum/BlobbercystsHighlight.kt | 8 +- .../rift/area/dreadfarm/RiftAgaricusCap.kt | 4 +- .../area/dreadfarm/RiftWiltedBerberisHelper.kt | 4 +- .../rift/area/dreadfarm/VoltHighlighter.kt | 8 +- .../area/livingcave/LivingCaveDefenseBlocks.kt | 4 +- .../area/livingcave/LivingCaveLivingMetalHelper.kt | 4 +- .../area/livingcave/LivingMetalSuitProgress.kt | 4 +- .../rift/area/mirrorverse/RiftLavaMazeParkour.kt | 4 +- .../rift/area/mirrorverse/RiftUpsideDownParkour.kt | 4 +- .../rift/area/mirrorverse/TubulatorParkour.kt | 4 +- .../rift/area/westvillage/VerminHighlighter.kt | 10 ++- .../rift/area/westvillage/kloon/KloonHacking.kt | 4 +- .../features/rift/area/wyldwoods/RiftLarva.kt | 8 +- .../features/rift/area/wyldwoods/RiftOdonata.kt | 8 +- .../rift/area/wyldwoods/ShyCruxWarnings.kt | 4 +- .../features/rift/everywhere/HighlightRiftGuide.kt | 4 +- .../rift/everywhere/RiftHorsezookaHider.kt | 4 +- .../skyhanni/features/rift/everywhere/RiftTimer.kt | 4 +- .../features/rift/everywhere/motes/RiftMotesOrb.kt | 4 +- .../rift/everywhere/motes/ShowMotesNpcSellPrice.kt | 4 +- .../features/skillprogress/SkillTooltip.kt | 4 +- .../skyhanni/features/slayer/HideMobNames.kt | 4 +- .../features/slayer/SlayerBossSpawnSoon.kt | 6 +- .../features/slayer/SlayerItemsOnGround.kt | 4 +- .../features/slayer/SlayerMiniBossFeatures.kt | 4 +- .../skyhanni/features/slayer/SlayerQuestWarning.kt | 4 +- .../features/slayer/SlayerRngMeterDisplay.kt | 4 +- .../features/slayer/blaze/BlazeSlayerClearView.kt | 4 +- .../slayer/blaze/BlazeSlayerDaggerHelper.kt | 4 +- .../slayer/blaze/BlazeSlayerFirePitsWarning.kt | 4 +- .../features/slayer/blaze/FirePillarDisplay.kt | 5 +- .../slayer/enderman/EndermanSlayerFeatures.kt | 8 +- .../slayer/enderman/EndermanSlayerHideParticles.kt | 4 +- .../features/stranded/HighlightPlaceableNpcs.kt | 4 +- .../features/summonings/SummoningMobManager.kt | 4 +- .../features/summonings/SummoningSoulsName.kt | 8 +- 222 files changed, 804 insertions(+), 373 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt index 9e9992ab1..625ded34f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.anvil import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName import at.hannibal2.skyhanni.utils.InventoryUtils.getLowerItems import at.hannibal2.skyhanni.utils.InventoryUtils.getUpperItems @@ -13,7 +14,8 @@ import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.inventory.ContainerChest import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class AnvilCombineHelper { +@SkyHanniModule +object AnvilCombineHelper { @SubscribeEvent fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt index a6a773bda..39f069771 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.bingo import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -9,7 +10,8 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class CompactBingoChat { +@SkyHanniModule +object CompactBingoChat { private val config get() = SkyHanniMod.feature.event.bingo.compactChat diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index 1ebbd9011..008a5263a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.hasEnchantments import at.hannibal2.skyhanni.utils.ItemUtils.itemName @@ -29,7 +30,8 @@ import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds -class MinionCraftHelper { +@SkyHanniModule +object MinionCraftHelper { private val config get() = SkyHanniMod.feature.event.bingo diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt index 1f84c11da..67326faea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.features.bingo.BingoAPI import at.hannibal2.skyhanni.features.bingo.card.goals.BingoGoal import at.hannibal2.skyhanni.features.bingo.card.goals.GoalType import at.hannibal2.skyhanni.features.bingo.card.goals.HiddenGoalData +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -22,7 +23,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration -class BingoCardReader { +@SkyHanniModule +object BingoCardReader { private val config get() = SkyHanniMod.feature.event.bingo.bingoCard private val patternGroup = RepoPattern.group("bingo.card") diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt index 3c88567af..abf8bbedc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.features.bingo.BingoAPI import at.hannibal2.skyhanni.features.bingo.BingoAPI.getData import at.hannibal2.skyhanni.features.bingo.card.goals.GoalType +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.InventoryUtils.getAllItems @@ -17,7 +18,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.inventory.ContainerChest import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class BingoCardTips { +@SkyHanniModule +object BingoCardTips { private val config get() = SkyHanniMod.feature.event.bingo.bingoCard diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt index 1f2e7bf32..5bf5b3448 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt @@ -3,13 +3,15 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class ArachneChatMessageHider { +@SkyHanniModule +object ArachneChatMessageHider { private val config get() = SkyHanniMod.feature.chat private var hideArachneDeadMessage = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index 1b4ae762c..f424b52a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.garden.GardenAPI +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils @@ -12,7 +13,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Pattern -class ChatFilter { +@SkyHanniModule +object ChatFilter { private val generalConfig get() = SkyHanniMod.feature.chat private val config get() = SkyHanniMod.feature.chat.filterType diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt index b4b8b10eb..4c75cd7ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt @@ -3,12 +3,14 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ChatManager import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.util.IChatComponent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class CompactBestiaryChatMessage { +@SkyHanniModule +object CompactBestiaryChatMessage { private var inBestiary = false private var bestiaryDescription = mutableListOf() diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt index c8db2de70..7547ae6ab 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.groupOrNull @@ -9,7 +10,8 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class CompactSplashPotionMessage { +@SkyHanniModule +object CompactSplashPotionMessage { private val config get() = SkyHanniMod.feature.chat.compactPotionMessages diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt index 768e74854..55c690199 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LocationUtils @@ -16,7 +17,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class PlayerDeathMessages { +@SkyHanniModule +object PlayerDeathMessages { private val lastTimePlayerSeen = mutableMapOf() diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt index e4145c98f..8a0670e98 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.colorCodeToRarity import at.hannibal2.skyhanni.utils.RegexUtils.matchMatchers @@ -9,7 +10,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.util.ChatComponentText import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class RareDropMessages { +@SkyHanniModule +object RareDropMessages { private val chatGroup = RepoPattern.group("pet.chatdrop") diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt index 190ddb493..d0a08c86f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/SkyblockXPInChat.kt @@ -3,10 +3,12 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ActionBarStatsData import at.hannibal2.skyhanni.events.ActionBarValueUpdateEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class SkyblockXPInChat { +@SkyHanniModule +object SkyblockXPInChat { val config get() = SkyHanniMod.feature.chat.skyBlockXPInChat diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt index 52e95b3a1..7bcaea265 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt @@ -4,14 +4,15 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.hypixel.chat.event.SystemMessageEvent import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.StringUtils.applyIfPossible import net.minecraft.event.ClickEvent import net.minecraft.event.HoverEvent -import net.minecraft.util.ChatComponentText import net.minecraft.util.IChatComponent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class PlayerChatModifier { +@SkyHanniModule +object PlayerChatModifier { private val config get() = SkyHanniMod.feature.chat.playerMessage private val patterns = mutableListOf() diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/FerocityDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/FerocityDisplay.kt index bffc60e40..31b85ddd0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/FerocityDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/FerocityDisplay.kt @@ -3,13 +3,16 @@ package at.hannibal2.skyhanni.features.combat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class FerocityDisplay { +@SkyHanniModule +object FerocityDisplay { + private val config get() = SkyHanniMod.feature.combat.ferocityDisplay /** diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt index acf4b6075..6bc0094e3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/HideDamageSplash.kt @@ -4,12 +4,14 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.entity.EntityLivingBase import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class HideDamageSplash { +@SkyHanniModule +object HideDamageSplash { @SubscribeEvent(priority = EventPriority.HIGH) fun onRenderLiving(event: SkyHanniRenderEntityEvent.Specials.Pre) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt index f64467203..5bdc521cd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha import at.hannibal2.skyhanni.utils.EntityUtils.hasMaxHealth import at.hannibal2.skyhanni.utils.LocationUtils @@ -24,7 +25,8 @@ import net.minecraft.entity.passive.EntityWolf import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds -class AreaMiniBossFeatures { +@SkyHanniModule +object AreaMiniBossFeatures { private val config get() = SkyHanniMod.feature.combat.mobs private var lastSpawnTime = SimpleTimeMark.farPast() diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt index dc05046ad..53c5d9650 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AshfangMinisNametagHider.kt @@ -2,13 +2,15 @@ package at.hannibal2.skyhanni.features.combat.mobs import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class AshfangMinisNametagHider { +@SkyHanniModule +object AshfangMinisNametagHider { private val config get() = SkyHanniMod.feature.combat.mobs 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 d5cc0ed9e..af439d767 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 @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha import at.hannibal2.skyhanni.utils.EntityUtils.getBlockInHand import at.hannibal2.skyhanni.utils.EntityUtils.hasNameTagWith @@ -25,7 +26,8 @@ import net.minecraft.entity.monster.EntitySpider import net.minecraft.init.Blocks import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class MobHighlight { +@SkyHanniModule +object MobHighlight { private val config get() = SkyHanniMod.feature.combat.mobs private var arachne: EntityLivingBase? = null diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt index ac2496f18..528ae4401 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt @@ -6,12 +6,13 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PacketEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.SimpleTimeMark -import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils.format import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern @@ -23,7 +24,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds -class SpawnTimers { +@SkyHanniModule +object SpawnTimers { private val config get() = SkyHanniMod.feature.combat.mobs diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt index 70b94c795..09626067c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/SendCoordinatedCommand.kt @@ -1,11 +1,13 @@ package at.hannibal2.skyhanni.features.commands import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LocationUtils import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class SendCoordinatedCommand { +@SkyHanniModule +object SendCoordinatedCommand { @SubscribeEvent fun onMessageSendToServer(event: MessageSendToServerEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt index 0401c0edb..e49ca5152 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/WarpIsCommand.kt @@ -2,11 +2,13 @@ package at.hannibal2.skyhanni.features.commands import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class WarpIsCommand { +@SkyHanniModule +object WarpIsCommand { @SubscribeEvent fun onMessageSendToServer(event: MessageSendToServerEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt index ca641889a..0f4d267f7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.enums.OutsideSbFeature import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -20,7 +21,8 @@ import java.util.LinkedList import kotlin.time.DurationUnit import kotlin.time.toDuration -class ArrowTrail { +@SkyHanniModule +object ArrowTrail { private val config get() = SkyHanniMod.feature.gui.cosmetic.arrowTrail diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt index a2dab30cf..34e962890 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.config.enums.OutsideSbFeature import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.LocationUtils @@ -20,7 +21,8 @@ import java.awt.Color import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds -class CosmeticFollowingLine { +@SkyHanniModule +object CosmeticFollowingLine { private val config get() = SkyHanniMod.feature.gui.cosmetic.followingLine diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt index b5d2ac230..d495972b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.SackAPI.getAmountInSacks import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils @@ -12,7 +13,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds -class DungeonArchitectFeatures { +@SkyHanniModule +object DungeonArchitectFeatures { private val config get() = SkyHanniMod.feature.dungeon private val patternGroup = RepoPattern.group("dungeon.architectsdraft") diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt index 6f5a83a85..53f1b4f6b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt @@ -3,11 +3,13 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.entity.EntityLivingBase import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonBossHideDamageSplash { +@SkyHanniModule +object DungeonBossHideDamageSplash { @SubscribeEvent(priority = EventPriority.HIGH) fun onRenderLiving(event: SkyHanniRenderEntityEvent.Specials.Pre) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt index bed6cbefe..62fccecae 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt @@ -2,10 +2,12 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonBossMessages { +@SkyHanniModule +object DungeonBossMessages { private val config get() = SkyHanniMod.feature.chat private val bossPattern = "ยง([cd4])\\[BOSS] (.*)".toPattern() diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt index f63d3e96e..a49369d83 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.chat.ChatConfig import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -10,7 +11,8 @@ import java.util.regex.Pattern private typealias MessageTypes = ChatConfig.DungeonMessageTypes -class DungeonChatFilter { +@SkyHanniModule +object DungeonChatFilter { private val config get() = SkyHanniMod.feature.chat diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt index e83916eee..0e283c774 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt @@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern @@ -18,7 +19,8 @@ import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.monster.EntityGuardian import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonCleanEnd { +@SkyHanniModule +object DungeonCleanEnd { private val config get() = SkyHanniMod.feature.dungeon.cleanEnd private val catacombsPattern by RepoPattern.pattern( diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt index 2651f14b3..11d749b66 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt @@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RenderUtils.renderString @@ -16,7 +17,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonCopilot { +@SkyHanniModule +object DungeonCopilot { private val config get() = SkyHanniMod.feature.dungeon.dungeonCopilot diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt index a61d0c986..4be042b43 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt @@ -5,12 +5,14 @@ import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.RenderUtils.renderString import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonDeathCounter { +@SkyHanniModule +object DungeonDeathCounter { private val config get() = SkyHanniMod.feature.dungeon private var display = "" diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt index 960ca8afc..d3a369201 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils @@ -22,7 +23,8 @@ import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent // TODO Remove all removeColor calls in this class. Deal with the color code in regex. -class DungeonFinderFeatures { +@SkyHanniModule +object DungeonFinderFeatures { private val config get() = SkyHanniMod.feature.dungeon.partyFinder // Repo group and patterns 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 f100e9cff..f80063303 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.EntityMoveEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha import at.hannibal2.skyhanni.utils.ItemUtils.cleanName import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture @@ -19,7 +20,8 @@ import net.minecraft.entity.item.EntityItem import net.minecraft.util.EnumParticleTypes import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonHideItems { +@SkyHanniModule +object DungeonHideItems { private val config get() = SkyHanniMod.feature.dungeon.objectHider @@ -28,25 +30,25 @@ class DungeonHideItems { // TODO put in skull data repo part - private val soulWeaverHider = + private const val SOUL_WEAVER_HIDER = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmYyNGVkNjg3NTMwNGZhNGExZjBjNzg1YjJjYjZhNmE3MjU2M2U5ZjNlMjRlYTU1ZTE4MTc4NDUyMTE5YWE2NiJ9fX0=" - private val blessingTexture = + private const val BLESSING_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTkzZTIwNjg2MTc4NzJjNTQyZWNkYTFkMjdkZjRlY2U5MWM2OTk5MDdiZjMyN2M0ZGRiODUzMDk0MTJkMzkzOSJ9fX0=" - private val reviveStoneTexture = + private const val REVIVE_STONE_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjZhNzZjYzIyZTdjMmFiOWM1NDBkMTI0NGVhZGJhNTgxZjVkZDllMThmOWFkYWNmMDUyODBhNWI0OGI4ZjYxOCJ9fX0K" - private val premiumFleshTexture = + private const val PREMIUM_FLESH_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWE3NWU4YjA0NGM3MjAxYTRiMmU4NTZiZTRmYzMxNmE1YWFlYzY2NTc2MTY5YmFiNTg3MmE4ODUzNGI4MDI1NiJ9fX0K" - private val abilityOrbTexture = + private const val ABILITY_ORB_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTAxZTA0MGNiMDFjZjJjY2U0NDI4MzU4YWUzMWQyZTI2NjIwN2M0N2NiM2FkMTM5NzA5YzYyMDEzMGRjOGFkNCJ9fX0=" - private val supportOrbTexture = + private const val SUPPORT_ORB_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTMxYTRmYWIyZjg3ZGI1NDMzMDEzNjUxN2I0NTNhYWNiOWQ3YzBmZTc4NDMwMDcwOWU5YjEwOWNiYzUxNGYwMCJ9fX0=" - private val damageOrbTexture = + private const val DAMAGE_ORB_TEXTURE = "eyJ0aW1lc3RhbXAiOjE1NzQ5NTEzMTkwNDQsInByb2ZpbGVJZCI6IjE5MjUyMWI0ZWZkYjQyNWM4OTMxZjAyYTg0OTZlMTFiIiwicHJvZmlsZU5hbWUiOiJTZXJpYWxpemFibGUiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2FiODZkYTJlMjQzYzA1ZGMwODk4YjBjYzVkM2U2NDg3NzE3MzE3N2UwYTIzOTQ0MjVjZWMxMDAyNTljYjQ1MjYifX19" - private val healerFairyTexture = + private const val HEALER_FAIRY_TEXTURE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19" private fun isSkeletonSkull(entity: EntityArmorStand): Boolean { @@ -91,7 +93,7 @@ class DungeonHideItems { event.isCanceled = true } - if (skullTexture == blessingTexture) { + if (skullTexture == BLESSING_TEXTURE) { event.isCanceled = true } } @@ -101,7 +103,7 @@ class DungeonHideItems { event.isCanceled = true } - if (skullTexture == reviveStoneTexture) { + if (skullTexture == REVIVE_STONE_TEXTURE) { event.isCanceled = true hideParticles[entity] = System.currentTimeMillis() } @@ -113,7 +115,7 @@ class DungeonHideItems { hideParticles[entity] = System.currentTimeMillis() } - if (skullTexture == premiumFleshTexture) { + if (skullTexture == PREMIUM_FLESH_TEXTURE) { event.isCanceled = true } } @@ -137,9 +139,9 @@ class DungeonHideItems { } when (skullTexture) { - abilityOrbTexture, - supportOrbTexture, - damageOrbTexture, + ABILITY_ORB_TEXTURE, + SUPPORT_ORB_TEXTURE, + DAMAGE_ORB_TEXTURE, -> { event.isCanceled = true hideParticles[entity] = System.currentTimeMillis() @@ -150,14 +152,14 @@ class DungeonHideItems { if (config.hideHealerFairy) { // Healer Fairy texture is stored in id 0, not id 4 for some reasos. - if (entity.inventory[0]?.getSkullTexture() == healerFairyTexture) { + if (entity.inventory[0]?.getSkullTexture() == HEALER_FAIRY_TEXTURE) { event.isCanceled = true return } } if (config.hideSoulweaverSkulls) { - if (skullTexture == soulWeaverHider) { + if (skullTexture == SOUL_WEAVER_HIDER) { event.isCanceled = true return } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt index 9d030e528..16b5cb5f6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.BlockClickEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.BlockUtils import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt import at.hannibal2.skyhanni.utils.LorenzColor @@ -14,7 +15,8 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawString import net.minecraft.init.Blocks import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonHighlightClickedBlocks { +@SkyHanniModule +object DungeonHighlightClickedBlocks { private val blocks = mutableListOf() private var colorIndex = 0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt index 15c6e1416..80a60ba4b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.TabListLineRenderEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils.groupOrNull import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -10,7 +11,8 @@ import at.hannibal2.skyhanni.utils.StringUtils.stripHypixelMessage import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonRankTabListColor { +@SkyHanniModule +object DungeonRankTabListColor { private val config get() = SkyHanniMod.feature.dungeon.tabList private val patternGroup = RepoPattern.group("dungeon.tablist") diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt index af5f21eae..f3378011e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt @@ -4,12 +4,14 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.TitleManager import at.hannibal2.skyhanni.events.PacketEvent import at.hannibal2.skyhanni.mixins.transformers.AccessorWorldBoarderPacket +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.SoundUtils import net.minecraft.network.play.server.S44PacketWorldBorder import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds -class DungeonShadowAssassinNotification { +@SkyHanniModule +object DungeonShadowAssassinNotification { private val config get() = SkyHanniMod.feature.dungeon @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt index 2575d4431..5f31a4dc5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.client.Minecraft import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.client.gui.FontRenderer @@ -10,7 +11,8 @@ import net.minecraft.scoreboard.ScorePlayerTeam import net.minecraft.scoreboard.Team import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonTeammateOutlines { +@SkyHanniModule +object DungeonTeammateOutlines { private val config get() = SkyHanniMod.feature.dungeon diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt index a5e11cbd0..1a543749d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.ConditionalUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland @@ -16,7 +17,8 @@ import at.hannibal2.skyhanni.utils.RegexUtils.findMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class DungeonsRaceGuide { +@SkyHanniModule +object DungeonsRaceGuide { private val config get() = SkyHanniMod.feature.dungeon.dungeonsRaceGuide private val raceActivePattern by RepoPattern.pattern( 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 6aba8843f..26b129dd9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt @@ -3,12 +3,14 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha import at.hannibal2.skyhanni.utils.LorenzColor import net.minecraft.entity.monster.EntitySilverfish import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class HighlightDungeonDeathmite { +@SkyHanniModule +object HighlightDungeonDeathmite { @SubscribeEvent fun onEntityHealthUpdate(event: EntityMaxHealthUpdateEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt index 747331ad8..dbc9bcdaa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt @@ -5,11 +5,13 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.entity.EntityLivingBase import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class TerracottaPhase { +@SkyHanniModule +object TerracottaPhase { private val config get() = SkyHanniMod.feature.dungeon.terracottaPhase diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt index ad42aba24..d88f5c017 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.ItemClickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands @@ -15,7 +16,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds -class DianaFixChat { +@SkyHanniModule +object DianaFixChat { private val config get() = SkyHanniMod.feature.event.diana diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt index 3c2623fea..f52c34320 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt @@ -2,13 +2,15 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds -class GriffinPetWarning { +@SkyHanniModule +object GriffinPetWarning { private var lastWarnTime = SimpleTimeMark.farPast() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt index 41d69d63e..e37041717 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt @@ -3,10 +3,12 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.diana.InquisitorFoundEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColorInt import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class HighlightInquisitors { +@SkyHanniModule +object Highlig