diff options
author | HiZe <super@hize.be> | 2024-10-11 18:33:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-11 18:33:04 +0200 |
commit | 0671e35163d55ab0f940aa6806a0d7bfb2876429 (patch) | |
tree | 7adc361416df400359c72591159e528df3d0a857 /src/main/java/at/hannibal2/skyhanni/features | |
parent | 0d34625ac157a477f04226fa76026601ecb79a49 (diff) | |
download | skyhanni-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.kt | 31 |
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 + } +} |