Java Code Examples for net.minecraft.util.BlockRenderLayer#CUTOUT

The following examples show how to use net.minecraft.util.BlockRenderLayer#CUTOUT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CableRenderer.java    From GregTech with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public boolean renderBlock(IBlockAccess world, BlockPos pos, IBlockState state, BufferBuilder buffer) {
    CCRenderState renderState = CCRenderState.instance();
    renderState.reset();
    renderState.bind(buffer);
    renderState.setBrightness(world, pos);
    IVertexOperation[] pipeline = {new Translation(pos)};

    BlockCable blockCable = (BlockCable) state.getBlock();
    TileEntityCable tileEntityCable = (TileEntityCable) blockCable.getPipeTileEntity(world, pos);
    if (tileEntityCable == null) return false;
    int paintingColor = tileEntityCable.getInsulationColor();
    int connectedSidesMask = blockCable.getActualConnections(tileEntityCable, world);
    Insulation insulation = tileEntityCable.getPipeType();
    Material material = tileEntityCable.getPipeMaterial();
    if (insulation != null && material != null) {
        BlockRenderLayer renderLayer = MinecraftForgeClient.getRenderLayer();
        if (renderLayer == BlockRenderLayer.CUTOUT) {
            renderCableBlock(material, insulation, paintingColor, renderState, pipeline, connectedSidesMask);
        }
        ICoverable coverable = tileEntityCable.getCoverableImplementation();
        coverable.renderCovers(renderState, new Matrix4().translate(pos.getX(), pos.getY(), pos.getZ()), renderLayer);
    }
    return true;
}
 
Example 2
Source File: BlockCactus.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
/*******************************************************************************
 * 2. Rendering
 *******************************************************************************/

@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
	return BlockRenderLayer.CUTOUT;
}
 
Example 3
Source File: BlockPepperSplint.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.CUTOUT;
}
 
Example 4
Source File: Ladder.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.CUTOUT;
}
 
Example 5
Source File: BlockOrbHolder.java    From Wizardry with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) {
	return layer == BlockRenderLayer.CUTOUT;
}
 
Example 6
Source File: BlockShoji.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.CUTOUT;
}
 
Example 7
Source File: BlockGrate.java    From AgriCraft with MIT License 4 votes vote down vote up
@Override
public BlockRenderLayer getBlockLayer() {
    return BlockRenderLayer.CUTOUT;
}
 
Example 8
Source File: BlockSapling.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
	return BlockRenderLayer.CUTOUT;
}
 
Example 9
Source File: BlockNoodle.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
    return BlockRenderLayer.CUTOUT;
}
 
Example 10
Source File: BlockPhysicsInfuserDummy.java    From Valkyrien-Skies with Apache License 2.0 4 votes vote down vote up
@Override
public BlockRenderLayer getRenderLayer() {
    return BlockRenderLayer.CUTOUT;
}
 
Example 11
Source File: BlockTofuYuba.java    From TofuCraftReload with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
    return BlockRenderLayer.CUTOUT;
}
 
Example 12
Source File: BlockGrapeVine.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
	return BlockRenderLayer.CUTOUT;
}
 
Example 13
Source File: BlockGiantPropellerPart.java    From Valkyrien-Skies with Apache License 2.0 4 votes vote down vote up
@Override
public BlockRenderLayer getRenderLayer() {
    return BlockRenderLayer.CUTOUT;
}
 
Example 14
Source File: GTBlockOreFlower.java    From GT-Classic with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public BlockRenderLayer getBlockLayer() {
	return BlockRenderLayer.CUTOUT;
}
 
Example 15
Source File: BlockBeacon.java    From Cyberware with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
	return BlockRenderLayer.CUTOUT;
}
 
Example 16
Source File: BlockVanillaSplint.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.CUTOUT;
}
 
Example 17
Source File: BlockAirshipEngine.java    From Valkyrien-Skies with Apache License 2.0 4 votes vote down vote up
@Override
public BlockRenderLayer getRenderLayer() {
    return BlockRenderLayer.CUTOUT;
}
 
Example 18
Source File: BlockCaptainsChair.java    From Valkyrien-Skies with Apache License 2.0 4 votes vote down vote up
@Override
public BlockRenderLayer getRenderLayer() {
    return BlockRenderLayer.CUTOUT;
}
 
Example 19
Source File: CoverBehavior.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public boolean canRenderInLayer(BlockRenderLayer renderLayer) {
    return renderLayer == BlockRenderLayer.CUTOUT;
}
 
Example 20
Source File: BlockPressurizedFluidTank.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
@Override
public BlockRenderLayer getBlockLayer() {
	return BlockRenderLayer.CUTOUT;
}