Merge pull request #1698 from yueh/fix-1648

Fixes #1648 Removes unecessary cast to BlockQuartzTorch
This commit is contained in:
yueh
2015-07-14 21:30:19 +02:00
@@ -99,8 +99,6 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
@Override @Override
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer ) public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
{ {
BlockQuartzTorch blk = (BlockQuartzTorch) block;
IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, x, y, z ); IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, x, y, z );
float Point2 = 6.0f / 16.0f; float Point2 = 6.0f / 16.0f;
@@ -149,19 +147,19 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
super.renderInWorld( block, world, x, y, z, renderer ); super.renderInWorld( block, world, x, y, z, renderer );
} }
blk.getRendererInstance().setTemporaryRenderIcon( Blocks.hopper.getIcon( 0, 0 ) ); block.getRendererInstance().setTemporaryRenderIcon( Blocks.hopper.getIcon( 0, 0 ) );
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff ); renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
boolean out = renderer.renderStandardBlock( blk, x, y, z ); boolean out = renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff ); renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point3 + zOff, Point3 + xOff, top + yOff, Point12 + zOff ); renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point3 + zOff, Point3 + xOff, top + yOff, Point12 + zOff );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point12 + xOff, bottom + yOff, Point3 + zOff, Point13 + xOff, top + yOff, Point12 + zOff ); renderer.setRenderBounds( Point12 + xOff, bottom + yOff, Point3 + zOff, Point13 + xOff, top + yOff, Point12 + zOff );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
if( te != null ) if( te != null )
{ {
@@ -170,46 +168,46 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
{ {
case EAST: case EAST:
renderer.setRenderBounds( 0, bottom + yOff, bottom + zOff, Point2 + xOff, top + yOff, top + zOff ); renderer.setRenderBounds( 0, bottom + yOff, bottom + zOff, Point2 + xOff, top + yOff, top + zOff );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
break; break;
case WEST: case WEST:
renderer.setRenderBounds( Point13 + xOff, bottom + yOff, bottom + zOff, 1.0, top + yOff, top + zOff ); renderer.setRenderBounds( Point13 + xOff, bottom + yOff, bottom + zOff, 1.0, top + yOff, top + zOff );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
break; break;
case NORTH: case NORTH:
renderer.setRenderBounds( bottom + xOff, bottom + yOff, Point13 + zOff, top + xOff, top + yOff, 1.0 ); renderer.setRenderBounds( bottom + xOff, bottom + yOff, Point13 + zOff, top + xOff, top + yOff, 1.0 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
break; break;
case SOUTH: case SOUTH:
renderer.setRenderBounds( bottom + xOff, bottom + yOff, 0, top + xOff, top + yOff, Point2 + zOff ); renderer.setRenderBounds( bottom + xOff, bottom + yOff, 0, top + xOff, top + yOff, Point2 + zOff );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
break; break;
case UP: case UP:
renderer.setRenderBounds( Point2, 0, Point2, Point3, bottom + yOff, Point3 ); renderer.setRenderBounds( Point2, 0, Point2, Point3, bottom + yOff, Point3 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point2, 0, Point12, Point3, bottom + yOff, Point13 ); renderer.setRenderBounds( Point2, 0, Point12, Point3, bottom + yOff, Point13 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point12, 0, Point2, Point13, bottom + yOff, Point3 ); renderer.setRenderBounds( Point12, 0, Point2, Point13, bottom + yOff, Point3 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point12, 0, Point12, Point13, bottom + yOff, Point13 ); renderer.setRenderBounds( Point12, 0, Point12, Point13, bottom + yOff, Point13 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
break; break;
case DOWN: case DOWN:
renderer.setRenderBounds( Point2, top + yOff, Point2, Point3, 1.0, Point3 ); renderer.setRenderBounds( Point2, top + yOff, Point2, Point3, 1.0, Point3 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point2, top + yOff, Point12, Point3, 1.0, Point13 ); renderer.setRenderBounds( Point2, top + yOff, Point12, Point3, 1.0, Point13 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point12, top + yOff, Point2, Point13, 1.0, Point3 ); renderer.setRenderBounds( Point12, top + yOff, Point2, Point13, 1.0, Point3 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
renderer.setRenderBounds( Point12, top + yOff, Point12, Point13, 1.0, Point13 ); renderer.setRenderBounds( Point12, top + yOff, Point12, Point13, 1.0, Point13 );
renderer.renderStandardBlock( blk, x, y, z ); renderer.renderStandardBlock( block, x, y, z );
break; break;
default: default:
} }
} }
renderer.renderAllFaces = false; renderer.renderAllFaces = false;
blk.getRendererInstance().setTemporaryRenderIcon( null ); block.getRendererInstance().setTemporaryRenderIcon( null );
return out; return out;
} }