Remove redundant type casts

This commit is contained in:
thatsIch
2015-09-25 22:30:38 +02:00
parent 3b495c35d7
commit 209298bb4d
9 changed files with 92 additions and 111 deletions
@@ -84,15 +84,13 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
}
@Override
public void renderTile( BlockSkyChest block, TileSkyChest tile, WorldRenderer tess, double x, double y, double z, float partialTick, ModelGenerator renderer )
public void renderTile( BlockSkyChest block, TileSkyChest skyChest, WorldRenderer tess, double x, double y, double z, float partialTick, ModelGenerator renderer )
{
if( !( tile instanceof TileSkyChest ) )
if( skyChest == null )
{
return;
}
final TileSkyChest skyChest = tile;
if( !skyChest.hasWorldObj() )
{
return;
@@ -101,7 +99,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 IBlockState metaData = tile.getWorld().getBlockState( tile.getPos() );
final IBlockState metaData = skyChest.getWorld().getBlockState( skyChest.getPos() );
final ResourceLocation loc = METADATA_TO_TEXTURE[ ((BlockSkyChest)metaData.getBlock()).type == SkyChestType.BLOCK ? 1 : 0 ];
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );