Fixes #2549: A block being rendered in the translucent layer will cause the item renderer to completely disable depth-writing causing silly looking models when held in hand.

This commit is contained in:
Sebastian Hartte 2016-11-04 11:51:00 +01:00
parent f5e4a202cb
commit c1483d87c7
1 changed files with 14 additions and 2 deletions

View File

@ -75,10 +75,22 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
return super.getActualState( state, worldIn, pos ).withProperty( POWERED, powered );
}
@SideOnly( Side.CLIENT)
/**
* NOTE: This is only used to determine how to render an item being held in hand.
* For determining block rendering, the method below is used (canRenderInLayer).
*/
@SideOnly( Side.CLIENT )
@Override
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
return BlockRenderLayer.CUTOUT;
}
@SideOnly( Side.CLIENT )
@Override
public boolean canRenderInLayer( BlockRenderLayer layer )
{
return layer == BlockRenderLayer.TRANSLUCENT;
}
public boolean isFullCube(IBlockState state)