Skip to content

Commit 964997d

Browse files
committed
fix BlockMixin
1 parent ef312af commit 964997d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/dev/isxander/culllessleaves/mixins/BlockMixin.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22

33
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
44
import dev.isxander.culllessleaves.CullLessLeaves;
5-
import me.fallenbreath.conditionalmixin.api.annotation.Condition;
6-
import me.fallenbreath.conditionalmixin.api.annotation.Restriction;
5+
import dev.isxander.culllessleaves.compat.Compat;
76
import net.minecraft.block.*;
87
import net.minecraft.util.math.BlockPos;
98
import net.minecraft.util.math.Direction;
109
import net.minecraft.world.BlockView;
1110
import org.spongepowered.asm.mixin.Mixin;
1211
import org.spongepowered.asm.mixin.injection.At;
1312

14-
@Restriction(conflict = { @Condition("moreculling"), @Condition("sodium") })
1513
@Mixin(Block.class)
1614
public class BlockMixin {
1715
@ModifyExpressionValue(method = "shouldDrawSide", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;isSideInvisible(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;)Z"))
1816
private static boolean shouldCullLeafSide(boolean isSideInvisible, BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos blockPos) {
19-
if (!(state.getBlock() instanceof LeavesBlock) || !CullLessLeaves.getConfig().enabled)
17+
if (!(state.getBlock() instanceof LeavesBlock) || !CullLessLeaves.getConfig().enabled || Compat.SODIUM)
2018
return isSideInvisible;
2119

2220
return CullLessLeaves.shouldCullSide(world, pos, side);

0 commit comments

Comments
 (0)