summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/rift
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-06-06 11:49:47 +1000
committerGitHub <noreply@github.com>2024-06-06 11:49:47 +1000
commitdc619eea46194955ede129b6a7125be2c1e8fa74 (patch)
treefaa23cfef9c0da8e9870fef0c7c1e71e13d9f74d /src/main/java/at/hannibal2/skyhanni/features/rift
parent4ef946f824817e91bdf9c2e0ae4f201e5c669f63 (diff)
downloadskyhanni-dc619eea46194955ede129b6a7125be2c1e8fa74.tar.gz
skyhanni-dc619eea46194955ede129b6a7125be2c1e8fa74.tar.bz2
skyhanni-dc619eea46194955ede129b6a7125be2c1e8fa74.zip
Backend: Classes -> Objects with annotation (#1982)
Co-authored-by: ThatGravyBoat <thatgravyboat@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/HighlightRiftGuide.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt4
20 files changed, 71 insertions, 31 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt
index 57aa28b42..900d207a7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
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
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -14,18 +15,19 @@ import net.minecraftforge.event.entity.living.LivingDeathEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.awt.Color
-class BlobbercystsHighlight {
+@SkyHanniModule
+object BlobbercystsHighlight {
private val config get() = SkyHanniMod.feature.rift.area.colosseum
private val entityList = mutableListOf<EntityOtherPlayerMP>()
- private val blobberName = "Blobbercyst "
+ private const val BLOBBER_NAME = "Blobbercyst "
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
if (!isEnabled()) return
if (!event.isMod(5)) return
EntityUtils.getEntities<EntityOtherPlayerMP>().forEach {
- if (it.name == blobberName) {
+ if (it.name == BLOBBER_NAME) {
RenderLivingEntityHelper.setEntityColorWithNoHurtTime(it, Color.RED.withAlpha(80)) { isEnabled() }
entityList.add(it)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
index c01d20157..161200fed 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.BlockUtils
import at.hannibal2.skyhanni.utils.BlockUtils.getBlockStateAt
import at.hannibal2.skyhanni.utils.InventoryUtils
@@ -15,7 +16,8 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.TimeUtils.format
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RiftAgaricusCap {
+@SkyHanniModule
+object RiftAgaricusCap {
private val config get() = RiftAPI.config.area.dreadfarm
private var startTime = SimpleTimeMark.farPast()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
index 9515330d1..3c9f69640 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.InventoryUtils
@@ -23,7 +24,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.awt.Color
import kotlin.time.Duration.Companion.milliseconds
-class RiftWiltedBerberisHelper {
+@SkyHanniModule
+object RiftWiltedBerberisHelper {
private val config get() = RiftAPI.config.area.dreadfarm.wiltedBerberis
private var isOnFarmland = false
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 d787ef22d..442dcadfa 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
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.EntityEquipmentChangeEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.EntityUtils.getEntities
import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
@@ -23,12 +24,13 @@ import java.awt.Color
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
-class VoltHighlighter {
+@SkyHanniModule
+object VoltHighlighter {
private val config get() = RiftAPI.config.area.dreadfarm.voltCrux
- private val LIGHTNING_DISTANCE = 7F
- private val ARMOR_SLOT_HEAD = 3
+ private const val LIGHTNING_DISTANCE = 7F
+ private const val ARMOR_SLOT_HEAD = 3
private val CHARGE_TIME = 12.seconds
private var chargingSince = mapOf<Entity, SimpleTimeMark>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
index 7b673f65e..24df4324c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.events.ServerBlockChangeEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
@@ -22,7 +23,8 @@ import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.util.EnumParticleTypes
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class LivingCaveDefenseBlocks {
+@SkyHanniModule
+object LivingCaveDefenseBlocks {
private val config get() = RiftAPI.config.area.livingCave.defenseBlockConfig
private var movingBlocks = mapOf<DefenseBlock, Long>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt
index 2ac0aee42..337b46824 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt
@@ -7,13 +7,15 @@ import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.events.ServerBlockChangeEvent
import at.hannibal2.skyhanni.events.TitleReceivedEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzVec
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class LivingCaveLivingMetalHelper {
+@SkyHanniModule
+object LivingCaveLivingMetalHelper {
private val config get() = RiftAPI.config.area.livingCave.livingCaveLivingMetalConfig
private var lastClicked: LorenzVec? = null
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt
index f64d5b42c..b0d4676f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingMetalSuitProgress.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.rift.area.livingcave
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -12,7 +13,8 @@ import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getLivingMetalProgr
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class LivingMetalSuitProgress {
+@SkyHanniModule
+object LivingMetalSuitProgress {
private val config get() = RiftAPI.config.area.livingCave.livingMetalSuitProgress
private var display = emptyList<List<Any>>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt
index f15badfe6..fd9c3eee0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt
@@ -7,13 +7,15 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+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
import at.hannibal2.skyhanni.utils.ParkourHelper
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RiftLavaMazeParkour {
+@SkyHanniModule
+object RiftLavaMazeParkour {
private val config get() = RiftAPI.config.area.mirrorverse.lavaMazeConfig
private var parkourHelper: ParkourHelper? = null
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 2c60dbce7..6278ee653 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
@@ -7,13 +7,15 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+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
import at.hannibal2.skyhanni.utils.ParkourHelper
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RiftUpsideDownParkour {
+@SkyHanniModule
+object RiftUpsideDownParkour {
private val config get() = RiftAPI.config.area.mirrorverse.upsideDownParkour
private var parkourHelper: ParkourHelper? = null
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt
index 697de2aa2..9de52ba47 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
import at.hannibal2.skyhanni.utils.ConditionalUtils
import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside
@@ -14,7 +15,8 @@ import at.hannibal2.skyhanni.utils.ParkourHelper
import net.minecraft.util.AxisAlignedBB
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class TubulatorParkour {
+@SkyHanniModule
+object TubulatorParkour {
private val config get() = RiftAPI.config.area.mirrorverse.tubulatorConfig
private var parkourHelper: ParkourHelper? = null
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt
index 5cf2368f0..3fa6af42f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
import at.hannibal2.skyhanni.utils.ConditionalUtils
@@ -20,15 +21,16 @@ import net.minecraft.entity.monster.EntitySilverfish
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.minutes
-class VerminHighlighter {
+@SkyHanniModule
+object VerminHighlighter {
private val config get() = RiftAPI.config.area.westVillage.verminHighlight
private val checkedEntities = TimeLimitedSet<Int>(1.minutes)
// TODO repo
- private val fly =
+ private const val FLY_TEXTURE =
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTMwYWMxZjljNjQ5Yzk5Y2Q2MGU0YmZhNTMzNmNjMTg1MGYyNzNlYWI5ZjViMGI3OTQwZDRkNGQ3ZGM4MjVkYyJ9fX0="
- private val spider =
+ private const val SPIDER_TEXTURE =
"ewogICJ0aW1lc3RhbXAiIDogMTY1MDU1NjEzMTkxNywKICAicHJvZmlsZUlkIiA6ICI0ODI5MmJkMjI1OTc0YzUwOTZiMTZhNjEyOGFmMzY3NSIsCiAgInByb2ZpbGVOYW1lIiA6ICJLVVJPVE9ZVEIyOCIsCiAgInNpZ25hdHVyZVJlcXVpcmVkIiA6IHRydWUsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS84ZmRmNjJkNGUwM2NhNTk0YzhjZDIxZGQxNzUzMjdmMWNmNzdjNGJjMDU3YTA5NTk2MDNkODNhNjhiYTI3MDA4IgogICAgfQogIH0KfQ=="
@SubscribeEvent
@@ -55,7 +57,7 @@ class VerminHighlighter {
}
private fun isVermin(entity: EntityLivingBase): Boolean = when (entity) {
- is EntityArmorStand -> entity.hasSkullTexture(fly) || entity.hasSkullTexture(spider)
+ is EntityArmorStand -> entity.hasSkullTexture(FLY_TEXTURE) || entity.hasSkullTexture(SPIDER_TEXTURE)
is EntitySilverfish -> entity.baseMaxHealth == 8
else -> false
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt
index 858581425..5bde50019 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
@@ -23,7 +24,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class KloonHacking {
+@SkyHanniModule
+object KloonHacking {
private val config get() = RiftAPI.config.area.westVillage.hacking
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt
index c595d7ab5..a89698596 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.rift.area.wyldwoods
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
import at.hannibal2.skyhanni.utils.EntityUtils.getEntities
@@ -12,11 +13,12 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import net.minecraft.entity.item.EntityArmorStand
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RiftLarva {
+@SkyHanniModule
+object RiftLarva {
private val config get() = RiftAPI.config.area.wyldWoods.larvas
private var hasHookInHand = false
- private val larvaSkullTexture =
+ private const val LARVA_SKULL_TEXTURE =
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTgzYjMwZTlkMTM1YjA1MTkwZWVhMmMzYWM2MWUyYWI1NWEyZDgxZTFhNThkYmIyNjk4M2ExNDA4MjY2NCJ9fX0="
@SubscribeEvent
@@ -37,7 +39,7 @@ class RiftLarva {
private fun findLarvas() {
for (stand in getEntities<EntityArmorStand>()) {
- if (stand.hasSkullTexture(larvaSkullTexture)) {
+ if (stand.hasSkullTexture(LARVA_SKULL_TEXTURE)) {
RenderLivingEntityHelper.setEntityColor(
stand,
config.highlightColor.toChromaColor().withAlpha(1)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt
index 34e702ed0..555e5968c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.rift.area.wyldwoods
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor
import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
import at.hannibal2.skyhanni.utils.EntityUtils.getEntities
@@ -13,11 +14,12 @@ import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import net.minecraft.entity.item.EntityArmorStand
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RiftOdonata {
+@SkyHanniModule
+object RiftOdonata {
private val config get() = RiftAPI.config.area.wyldWoods.odonata
private var hasBottleInHand = false
- private val odonataSkullTexture =
+ private const val ODONATA_SKULL_TEXTURE =
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWZkODA2ZGVmZGZkZjU5YjFmMjYwOWM4ZWUzNjQ2NjZkZTY2MTI3YTYyMzQxNWI1NDMwYzkzNThjNjAxZWY3YyJ9fX0="
private val emptyBottle by lazy { "EMPTY_ODONATA_BOTTLE".asInternalName() }
@@ -39,7 +41,7 @@ class RiftOdonata {
private fun findOdonatas() {
for (stand in getEntities<EntityArmorStand>()) {
- if (stand.hasSkullTexture(odonataSkullTexture)) {
+ if (stand.hasSkullTexture(ODONATA_SKULL_TEXTURE)) {
RenderLivingEntityHelper.setEntityColor(
stand,
config.highlightColor.toChromaColor().withAlpha(1)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt
index c037d5cfc..540fb3b81 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt
@@ -3,13 +3,15 @@ package at.hannibal2.skyhanni.features.rift.area.wyldwoods
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.milliseconds
-class ShyCruxWarnings {
+@SkyHanniModule
+object ShyCruxWarnings {
private val config get() = RiftAPI.config.area.wyldWoods
private val shyNames = arrayOf("I'm ugly! :(", "Eek!", "Don't look at me!", "Look away!")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/HighlightRiftGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/HighlightRiftGuide.kt
index c4b585197..5068406ff 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/HighlightRiftGuide.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/HighlightRiftGuide.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LorenzColor
@@ -11,7 +12,8 @@ import at.hannibal2.skyhanni.utils.RenderUtils.highlight
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class HighlightRiftGuide {
+@SkyHanniModule
+object HighlightRiftGuide {
private var inInventory = false
private var highlightedItems = emptyList<Int>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
index b908f49f8..3a4717279 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftHorsezookaHider.kt
@@ -3,11 +3,13 @@ package at.hannibal2.skyhanni.features.rift.everywhere
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.CheckRenderEntityEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.InventoryUtils
import net.minecraft.entity.passive.EntityHorse
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RiftHorsezookaHider {
+@SkyHanniModule
+object RiftHorsezookaHider {
@SubscribeEvent
fun onCheckRender(event: CheckRenderEntityEvent<*>) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt
index d8ecd3299..a4d277ceb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ConditionalUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst
@@ -17,7 +18,8 @@ import kotlin.time.Duration
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds
-class RiftTimer {
+@SkyHanniModule
+object RiftTimer {
private val config get() = RiftAPI.config.timer
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt
index 2531c6d0f..927416963 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
@@ -17,7 +18,8 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.util.EnumParticleTypes
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class RiftMotesOrb {
+@SkyHanniModule
+object RiftMotesOrb {
private val config get() = RiftAPI.config.motesOrbs
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
index 07dad95c0..df91766cc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.features.rift.RiftAPI.motesNpcPrice
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils.chat
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.ConfigUtils
@@ -26,7 +27,8 @@ import at.hannibal2.skyhanni.utils.renderables.Renderable
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-class ShowMotesNpcSellPrice {
+@SkyHanniModule
+object ShowMotesNpcSellPrice {
private val config get() = RiftAPI.config.motes