aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorHiZe <super@hize.be>2024-10-11 18:33:04 +0200
committerGitHub <noreply@github.com>2024-10-11 18:33:04 +0200
commit0671e35163d55ab0f940aa6806a0d7bfb2876429 (patch)
tree7adc361416df400359c72591159e528df3d0a857 /src/main/java/at/hannibal2/skyhanni/features
parent0d34625ac157a477f04226fa76026601ecb79a49 (diff)
downloadskyhanni-0671e35163d55ab0f940aa6806a0d7bfb2876429.tar.gz
skyhanni-0671e35163d55ab0f940aa6806a0d7bfb2876429.tar.bz2
skyhanni-0671e35163d55ab0f940aa6806a0d7bfb2876429.zip
Feature: Change lava color (#1885)
Co-authored-by: nea <nea@nea.moe> Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/LavaReplacement.kt31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/LavaReplacement.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/LavaReplacement.kt
new file mode 100644
index 000000000..663f2d87a
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/LavaReplacement.kt
@@ -0,0 +1,31 @@
+package at.hannibal2.skyhanni.features.fishing
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
+import at.hannibal2.skyhanni.events.ConfigLoadEvent
+import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
+import at.hannibal2.skyhanni.utils.ConditionalUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
+import net.minecraft.client.Minecraft
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+@SkyHanniModule
+object LavaReplacement {
+
+ private val config get() = SkyHanniMod.feature.fishing.lavaReplacement
+
+ @SubscribeEvent
+ fun onConfigLoad(event: ConfigLoadEvent) {
+ ConditionalUtils.onToggle(config.enabled, config.onlyInCrimsonIsle) {
+ Minecraft.getMinecraft().renderGlobal.loadRenderers()
+ }
+ }
+
+ @JvmStatic
+ fun replaceLava(): Boolean {
+ if (!LorenzUtils.inSkyBlock || !config.enabled.get()) return false
+ if (config.onlyInCrimsonIsle.get() && !IslandType.CRIMSON_ISLE.isInIsland()) return false
+ return true
+ }
+}