Attempt to fix Optifine leaves fancy/fast "flickering" problem
@@ -35,7 +35,6 @@ import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
-import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -622,14 +621,13 @@ public class BlockDynamicLeaves extends BlockLeaves implements ITreePart, IAgeab
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
- setGraphicsLevel(Minecraft.isFancyGraphicsEnabled());
- return super.getBlockLayer();
+ return Blocks.LEAVES.getBlockLayer();
}
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
- setGraphicsLevel(Minecraft.isFancyGraphicsEnabled());
+ setGraphicsLevel(!Blocks.LEAVES.isOpaqueCube(blockState));
return super.shouldSideBeRendered(blockState, blockAccess, pos, side);
}
