diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/sodium/SodiumLightDataAccessMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/sodium/SodiumLightDataAccessMixin.java index 33efad5aff..e70755b1f8 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/sodium/SodiumLightDataAccessMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/sodium/SodiumLightDataAccessMixin.java @@ -7,6 +7,7 @@ import me.jellysquid.mods.sodium.client.model.light.data.LightDataAccess; import meteordevelopment.meteorclient.systems.modules.Modules; +import meteordevelopment.meteorclient.systems.modules.render.Fullbright; import meteordevelopment.meteorclient.systems.modules.render.Xray; import net.minecraft.block.BlockState; import net.minecraft.util.math.BlockPos; @@ -23,7 +24,7 @@ @Mixin(value = LightDataAccess.class, remap = false) public class SodiumLightDataAccessMixin { @Unique - private static final int FULL_LIGHT = 15 << 20 | 15 << 4; + private static final int FULL_LIGHT = 15 | 15 << 4 | 15 << 8; @Shadow protected BlockRenderView world; @@ -39,7 +40,7 @@ private void onInit(CallbackInfo info) { } @ModifyVariable(method = "compute", at = @At(value = "TAIL"), name = "bl") - private int compute_modifyAO(int light) { + private int compute_modifyBL(int light) { if (xray.isActive()) { BlockState state = world.getBlockState(pos); if (!xray.isBlocked(state.getBlock(), pos)) return FULL_LIGHT; @@ -47,4 +48,9 @@ private int compute_modifyAO(int light) { return light; } + + @ModifyVariable(method = "compute", at = @At(value = "TAIL"), name = "sl") + private int compute_modifySL(int light) { + return Math.max(Modules.get().get(Fullbright.class).getLuminance(), light); + } }