}
@Override
public boolean renderInWorld(AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
{
BlockMolecularAssembler blk = (BlockMolecularAssembler) block;
TileMolecularAssembler tma = blk.getTileEntity( world, x, y, z );
if ( BlockMolecularAssembler.booleanAlphaPass )
{
if ( tma.isPowered() )
{
renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.SOUTH );
TaughtIcon lights = new TaughtIcon( ExtraBlockTextures.BlockMolecularAssemblerLights.getIcon(), -2.0f );
Tessellator.instance.setColorRGBA_F( 1, 1, 1, 0.3f );
Tessellator.instance.setBrightness( 14 << 20 | 14 << 4 );
renderer.renderFaceXNeg( blk, x, y, z, lights );
renderer.renderFaceXPos( blk, x, y, z, lights );
renderer.renderFaceYNeg( blk, x, y, z, lights );
renderer.renderFaceYPos( blk, x, y, z, lights );
renderer.renderFaceZNeg( blk, x, y, z, lights );
renderer.renderFaceZPos( blk, x, y, z, lights );
return true;
}
return false;
}
BusRenderer.instance.renderer.blockAccess = renderer.blockAccess;
renderer = BusRenderer.instance.renderer;
preRenderInWorld( block, world, x, y, z, renderer );
tma.lightCache = BusRenderHelper.instance.useSimplifiedRendering( x, y, z, this, tma.lightCache );
BusRenderer.instance.renderer.isFacade = true;
IOrientable te = getOrientable( block, world, x, y, z );
ForgeDirection fdy = te.getUp();
ForgeDirection fdz = te.getForward();
ForgeDirection fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
renderer.renderAllFaces = true;
renderCableAt( 0.11D, world, x, y, z, block, renderer, 0.141D, false );
renderCableAt( 0.188D, world, x, y, z, block, renderer, 0.1875D, true );
blk.getRendererInstance().setTemporaryRenderIcon( blk.getIcon( 0, 0 ) );
renderBlockBounds( renderer, 2, 14, 0, 14, 16, 2, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 0, 14, 2, 2, 16, 14, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 2, 0, 14, 14, 2, 16, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 14, 0, 2, 16, 2, 14, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
// sides...
renderBlockBounds( renderer, 0, 0, 0, 16, 2, 2, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 0, 2, 0, 2, 16, 2, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 0, 0, 2, 2, 2, 16, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 0, 14, 14, 16, 16, 16, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 14, 0, 14, 16, 14, 16, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 14, 14, 0, 16, 16, 14, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 14, 2, 0, 16, 14, 2, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 0, 2, 14, 2, 14, 16, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, fdx, fdy, fdz );
renderer.renderStandardBlock( blk, x, y, z );
BusRenderHelper.instance.normalRendering();
blk.getRendererInstance().setTemporaryRenderIcon( null );
renderer.renderAllFaces = false;
BusRenderer.instance.renderer.isFacade = false;
postRenderInWorld( renderer );