From cdbb4450354dd93a7fbc0074a86eea152f1fc2e5 Mon Sep 17 00:00:00 2001 From: blocksimus <336769374+blocksimus@users.noreply.github.com> Date: Sat, 17 Oct 2026 21:11:09 +1100 Subject: [PATCH 1/2] fix: start without Sodium installed Fabric Loader 0.19.4+ makes missing mixin targets fatal, which hits lambda-loader installs now, and everyone once the loader gets bumped. Skip the Sodium and Indigo mixins when they aren't installed. --- .../lambda/mixin/OptionalModMixinPlugin.java | 61 +++++++++++++++++++ src/main/resources/lambda.mixins.json | 1 + 2 files changed, 62 insertions(+) create mode 100644 src/main/java/com/lambda/mixin/OptionalModMixinPlugin.java diff --git a/src/main/java/com/lambda/mixin/OptionalModMixinPlugin.java b/src/main/java/com/lambda/mixin/OptionalModMixinPlugin.java new file mode 100644 index 000000000..723be4e38 --- /dev/null +++ b/src/main/java/com/lambda/mixin/OptionalModMixinPlugin.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 Lambda + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.lambda.mixin; + +import net.fabricmc.loader.api.FabricLoader; +import org.objectweb.asm.tree.ClassNode; +import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; +import org.spongepowered.asm.mixin.extensibility.IMixinInfo; + +import java.util.List; +import java.util.Set; + +public class OptionalModMixinPlugin implements IMixinConfigPlugin { + @Override + public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { + if (targetClassName.startsWith("net.caffeinemc.mods.sodium.")) { + return FabricLoader.getInstance().isModLoaded("sodium"); + } + if (targetClassName.startsWith("net.fabricmc.fabric.impl.client.indigo.")) { + return FabricLoader.getInstance().isModLoaded("fabric-renderer-indigo"); + } + return true; + } + + @Override + public void onLoad(String mixinPackage) {} + + @Override + public String getRefMapperConfig() { + return null; + } + + @Override + public void acceptTargets(Set myTargets, Set otherTargets) {} + + @Override + public List getMixins() { + return null; + } + + @Override + public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {} + + @Override + public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {} +} diff --git a/src/main/resources/lambda.mixins.json b/src/main/resources/lambda.mixins.json index 91a5111b4..c6bb57798 100644 --- a/src/main/resources/lambda.mixins.json +++ b/src/main/resources/lambda.mixins.json @@ -2,6 +2,7 @@ "required": true, "minVersion": "0.8", "package": "com.lambda.mixin", + "plugin": "com.lambda.mixin.OptionalModMixinPlugin", "compatibilityLevel": "JAVA_21", "client": [ "CrashReportMixin", From 1ec2346451dbaf9c07b3bf634d2b4f52028047e1 Mon Sep 17 00:00:00 2001 From: blocksimus <336769374+blocksimus@users.noreply.github.com> Date: Sat, 17 Oct 2026 20:34:49 +1100 Subject: [PATCH 2/2] fix: stop No Terrain Fog hiding Voxy LODs Voxy stops drawing LODs when the fog ends inside the render distance, and the zeros put it at 0. Push the distances out to Float.MAX_VALUE instead. Alpha's still 0, so there's no fog either way. --- .../java/com/lambda/mixin/render/SodiumWorldRendererMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lambda/mixin/render/SodiumWorldRendererMixin.java b/src/main/java/com/lambda/mixin/render/SodiumWorldRendererMixin.java index c43bc70ba..ebb6f4add 100644 --- a/src/main/java/com/lambda/mixin/render/SodiumWorldRendererMixin.java +++ b/src/main/java/com/lambda/mixin/render/SodiumWorldRendererMixin.java @@ -29,7 +29,7 @@ @Mixin(SodiumWorldRenderer.class) public class SodiumWorldRendererMixin { @Unique - private final FogParameters NO_FOG = new FogParameters(0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f); + private final FogParameters NO_FOG = new FogParameters(0f, 0f, 0f, 0f, Float.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE); @ModifyExpressionValue(method = "drawChunkLayer(Lnet/minecraft/client/render/BlockRenderLayerGroup;Lnet/caffeinemc/mods/sodium/client/render/chunk/ChunkRenderMatrices;DDDLnet/minecraft/client/gl/GpuSampler;)V", at = @At(value = "FIELD", target = "Lnet/caffeinemc/mods/sodium/client/render/SodiumWorldRenderer;lastFogParameters:Lnet/caffeinemc/mods/sodium/client/util/FogParameters;", opcode = Opcodes.GETFIELD)) private FogParameters modifyFogParameters(FogParameters original) {