2.0.0 - Config and Smart Leaves resourcepack!

This commit is contained in:
Motschen
2021-01-14 16:21:32 +01:00
parent d762b6c022
commit 2a2b97f41a
12 changed files with 182 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package eu.midnightdust.cullleaves.mixin;
import eu.midnightdust.cullleaves.CullLeavesClient;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.Block;
@@ -19,6 +20,9 @@ public class MixinLeavesBlock extends Block {
@Override
@SuppressWarnings("deprecation")
public boolean isSideInvisible(BlockState state, BlockState neighborState, Direction offset) {
return neighborState.getBlock() instanceof LeavesBlock;
if (CullLeavesClient.CL_CONFIG.enabled) {
return neighborState.getBlock() instanceof LeavesBlock;
}
else return false;
}
}