#Mxin help
21 messages · Page 1 of 1 (latest)
im trying to figure out fullbright
that wouldn't involve outright removing the gamma option
i think thats what verifys the option is within an acceptable range idk
thats what ive been doing. i got this idea from one
but the mixin doesnt work for me cause one of the arguments has private access
access doesn't really affect mixins
it highlights it red and wont compile
you're doing something wrong then
you can send the mixin here
but also I'm still not convinced that this is the right way to go about it either lol
idk you may be right. here is is though
package com.nunyabiz_.client.mixins.tools.fullbright;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import net.minecraft.client.option.GameOptions;
import net.minecraft.client.option.SimpleOption;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@Mixin({GameOptions.class})
public class MixinGameOptions<T> {
@WrapOperation(method = {"acceptProfiledOptions"}, at = {@At(value = "INVOKE", target = "Lnet/minecraft/client/option/GameOptions$OptionVisitor;accept(Ljava/lang/String;Lnet/minecraft/client/option/SimpleOption;)V")})
private void doNotVisitGamma(GameOptions.OptionVisitor instance, String key, SimpleOption<T> option, Operation<Void> original) {
if (!key.equals("gamma"))
original.call(new Object[] { instance, key, option });
}
}
thats from the mod
GameOptions.OptionVisitor has private access