diff options
Diffstat (limited to 'src')
3 files changed, 31 insertions, 20 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java index ed3cc1682..99edc22e2 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/AshfangConfig.java @@ -4,7 +4,6 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; -import io.github.moulberry.moulconfig.annotations.ConfigEditorColour; import io.github.moulberry.moulconfig.annotations.ConfigOption; public class AshfangConfig { @@ -28,17 +27,6 @@ public class AshfangConfig { public Position nextResetCooldownPos = new Position(10, 10, false, true); @Expose - @ConfigOption(name = "Blazing Souls", desc = "Shows the Blazing Souls more clearly.") - @ConfigEditorBoolean - @FeatureToggle - public boolean blazingSouls = false; - - @Expose - @ConfigOption(name = "Souls Color", desc = "Color of the Ashfang Blazing Souls.") - @ConfigEditorColour - public String blazingSoulsColor = "0:245:85:255:85"; - - @Expose @ConfigOption(name = "Highlight Blazes", desc = "Highlight the different blazes in their respective colors.") @ConfigEditorBoolean @FeatureToggle diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java index e9f861606..70167e5a6 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/CrimsonIsleConfig.java @@ -34,5 +34,24 @@ public class CrimsonIsleConfig { @ConfigEditorColour public String color = "0:120:255:85:85"; } + + @ConfigOption(name = "Blazing Souls", desc = "") + @Accordion + @Expose + public BlazingSoulsColor blazingSouls = new BlazingSoulsColor(); + + public static class BlazingSoulsColor { + + @Expose + @ConfigOption(name = "Enabled", desc = "Shows the Blazing Souls more clearly.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption(name = "Souls Color", desc = "Color of the Blazing Souls.") + @ConfigEditorColour + public String color = "0:245:85:255:85"; + } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt index c9f585828..92b7144f6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.features.damageindicator.BossType @@ -15,6 +16,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color class AshfangBlazingSouls { + private val config get() = SkyHanniMod.feature.crimsonIsle.ashfang.blazingSouls private val texture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI4N2IzOTdkYWY5NTE2YTBiZDc2ZjVmMWI3YmY5Nzk1MTVkZjNkNWQ4MzNlMDYzNWZhNjhiMzdlZTA4MjIxMiJ9fX0=" @@ -25,17 +27,15 @@ class AshfangBlazingSouls { if (!isEnabled()) return EntityUtils.getEntities<EntityArmorStand>() - .filter { it !in souls && it.hasSkullTexture(texture) - }.forEach { souls.add(it) } + .filter { it !in souls && it.hasSkullTexture(texture) } + .forEach { souls.add(it) } } @SubscribeEvent fun onRenderWorld(event: RenderWorldLastEvent) { if (!isEnabled()) return - val special = SkyHanniMod.feature.ashfang.blazingSoulsColor - - val color = Color(SpecialColour.specialToChromaRGB(special), true) + val color = Color(SpecialColour.specialToChromaRGB(config.color), true) val playerLocation = LocationUtils.playerLocation() for (orb in souls) { @@ -54,8 +54,12 @@ class AshfangBlazingSouls { souls.clear() } - private fun isEnabled(): Boolean { - return LorenzUtils.inSkyBlock && SkyHanniMod.feature.ashfang.blazingSouls && - DamageIndicatorManager.isBossSpawned(BossType.NETHER_ASHFANG) + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(2, "ashfang.blazingSouls", "crimsonIsle.ashfang.blazingSouls.enabled") + event.move(2, "ashfang.blazingSoulsColor", "crimsonIsle.ashfang.blazingSouls.color") } + + private fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled && + DamageIndicatorManager.isBossSpawned(BossType.NETHER_ASHFANG) }
\ No newline at end of file |