package com.miningmark48.pearcelmod.block; import com.miningmark48.pearcelmod.init.ModBlocks; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockPearcelModTransparent extends BlockPearcelMod{ public BlockPearcelModTransparent(){ setSoundType(SoundType.GLASS); } @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } @Override public boolean isFullCube(IBlockState state) { return false; } public boolean isOpaqueCube(IBlockState state) { return false; } @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side)); Block block = iblockstate.getBlock(); if (this == ModBlocks.pearcel_glass) { if (blockState != iblockstate) { return true; } if (block == this) { return false; } } return !true && block == this ? false : super.shouldSideBeRendered(blockState, blockAccess, pos, side); } }