Skip to content

Commit 0547c20

Browse files
committed
update the sodium version to 0.8.7 and fix the mixin for XRay
1 parent 2c5a428 commit 0547c20

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fabricLoaderVersion=0.18.3
4343
yarnMappings=build.3
4444
fabricApiVersion=0.139.5
4545
kotlinFabricVersion=1.13.8+kotlin
46-
sodiumVersion=mc1.21.11-0.8.0-fabric
46+
sodiumVersion=mc1.21.11-0.8.7-fabric
4747
litematicaVersion=0.25.1
4848
maLiLibVersion=0.27.1
4949

src/main/java/com/lambda/mixin/render/SodiumBlockOcclusionCacheMixin.java renamed to src/main/java/com/lambda/mixin/render/AbstractBlockRenderContextMixin.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@
1919

2020
import com.lambda.module.modules.render.XRay;
2121
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
22-
import net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.BlockOcclusionCache;
22+
import net.caffeinemc.mods.sodium.client.render.model.AbstractBlockRenderContext;
2323
import net.minecraft.block.BlockState;
24-
import net.minecraft.util.math.BlockPos;
25-
import net.minecraft.util.math.Direction;
26-
import net.minecraft.world.BlockView;
2724
import org.spongepowered.asm.mixin.Mixin;
25+
import org.spongepowered.asm.mixin.Shadow;
2826
import org.spongepowered.asm.mixin.injection.At;
2927

30-
@Mixin(BlockOcclusionCache.class)
31-
public class SodiumBlockOcclusionCacheMixin {
28+
@Mixin(AbstractBlockRenderContext.class)
29+
public class AbstractBlockRenderContextMixin {
30+
@Shadow
31+
protected BlockState state;
32+
3233
@ModifyReturnValue(method = "shouldDrawSide", at = @At("RETURN"))
33-
private boolean modifyShouldDrawSide(boolean original, BlockState state, BlockView view, BlockPos pos, Direction facing) {
34+
private boolean modifyShouldDrawSide(boolean original) {
3435
if (XRay.INSTANCE.isEnabled() && XRay.isSelected(state) && XRay.getOpacity() < 100)
3536
return true;
3637
return original;

src/main/resources/lambda.mixins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"render.RenderLayersMixin",
6464
"render.ScreenHandlerMixin",
6565
"render.ScreenMixin",
66-
"render.SodiumBlockOcclusionCacheMixin",
66+
"render.AbstractBlockRenderContextMixin",
6767
"render.SodiumBlockRendererMixin",
6868
"render.SodiumFluidRendererImplMixin",
6969
"render.SodiumLightDataAccessMixin",

0 commit comments

Comments
 (0)