Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
superhize committed Oct 10, 2024
1 parent a95b280 commit c61aafd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
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

Expand All @@ -18,4 +21,10 @@ object LavaReplacement {
Minecraft.getMinecraft().renderGlobal.loadRenderers()
}
}

fun replaceLava(): Boolean {
if (!LorenzUtils.inSkyBlock || !config.enabled.get()) return false
if (config.onlyInCrimsonIsle.get() && !IslandType.CRIMSON_ISLE.isInIsland()) return false
return true
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package at.hannibal2.skyhanni.mixins.transformers;

import at.hannibal2.skyhanni.mixins.hooks.BlockFluidRendererHook;
import at.hannibal2.skyhanni.features.fishing.LavaReplacement;
import net.minecraft.client.renderer.BlockFluidRenderer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -18,8 +18,8 @@ public abstract class MixinBlockLiquid {
method = "renderFluid",
at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockLiquid;colorMultiplier(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/BlockPos;)I")
)
TextureAtlasSprite[] replacerenderedFluid(TextureAtlasSprite[] value) {
if (BlockFluidRendererHook.replaceLava()) {
TextureAtlasSprite[] replaceRenderedFluid(TextureAtlasSprite[] value) {
if (LavaReplacement.INSTANCE.replaceLava()) {
return this.atlasSpritesWater;
}
return value;
Expand Down

0 comments on commit c61aafd

Please sign in to comment.