Fixes it being reset by the graphics settings screen, and doesn't need to modify the option Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
24 lines
727 B
Java
24 lines
727 B
Java
package fr.username404.snowygui.mixins;
|
|
|
|
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
|
import fr.username404.snowygui.gui.feature.GammaBoost;
|
|
import net.minecraft.client.renderer.LightTexture;
|
|
import org.spongepowered.asm.mixin.Mixin;
|
|
import org.spongepowered.asm.mixin.injection.At;
|
|
|
|
@Mixin(LightTexture.class)
|
|
abstract class GammaMixin {
|
|
@ModifyExpressionValue(
|
|
method = "updateLightTexture(F)V", at = @At(
|
|
value = "INVOKE",
|
|
target = "Ljava/lang/Double;floatValue()F",
|
|
ordinal = 1
|
|
)
|
|
)
|
|
public float highGamma(float original) {
|
|
if (GammaBoost.INSTANCE.getToggled())
|
|
return GammaBoost.BOOST;
|
|
return original;
|
|
}
|
|
}
|