Remove redundant type casts

This commit is contained in:
thatsIch
2015-09-25 22:30:38 +02:00
parent bcba2329b7
commit 80e1a2863b
9 changed files with 96 additions and 117 deletions
@@ -81,15 +81,13 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
}
@Override
public void renderTile( BlockSkyChest block, TileSkyChest tile, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer )
public void renderTile( BlockSkyChest block, TileSkyChest skyChest, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer )
{
if( !( tile instanceof TileSkyChest ) )
if( skyChest == null )
{
return;
}
final TileSkyChest skyChest = (TileSkyChest) tile;
if( !skyChest.hasWorldObj() )
{
return;
@@ -98,7 +96,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
final int metaData = tile.getWorldObj().getBlockMetadata( tile.xCoord, tile.yCoord, tile.zCoord );
final int metaData = skyChest.getWorldObj().getBlockMetadata( skyChest.xCoord, skyChest.yCoord, skyChest.zCoord );
final ResourceLocation loc = METADATA_TO_TEXTURE[metaData];
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );