Reduce scope of variables

This commit is contained in:
thatsIch
2015-09-25 22:52:41 +02:00
parent f4ff28d2a6
commit 0387d30d1c
78 changed files with 174 additions and 218 deletions
@@ -60,7 +60,6 @@ public class PaintBallRender implements IItemRenderer
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
ItemPaintBall ipb = (ItemPaintBall) item.getItem();
@@ -75,11 +74,10 @@ public class PaintBallRender implements IItemRenderer
int g = ( colorValue >> 8 ) & 0xff;
int b = ( colorValue ) & 0xff;
int full = (int) ( 255 * 0.3 );
float fail = 0.7f;
if( item.getItemDamage() >= 20 )
{
float fail = 0.7f;
int full = (int) ( 255 * 0.3 );
GL11.glColor4ub( (byte) ( full + r * fail ), (byte) ( full + g * fail ), (byte) ( full + b * fail ), (byte) 255 );
}
else
@@ -112,6 +110,7 @@ public class PaintBallRender implements IItemRenderer
{
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
}
float f12 = 0.0625F;
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
@@ -58,7 +58,6 @@ public class ToolBiometricCardRender implements IItemRenderer
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance;
GL11.glPushMatrix();
@@ -83,6 +82,7 @@ public class ToolBiometricCardRender implements IItemRenderer
else
{
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
float f12 = 0.0625F;
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
@@ -111,7 +111,6 @@ public class ToolBiometricCardRender implements IItemRenderer
GL11.glDisable( GL11.GL_LIGHTING );
tessellator.startDrawingQuads();
float z = 0;
AEColor col = AEColor.values()[Math.abs( 3 + hash ) % AEColor.values().length];
if( hash == 0 )
@@ -119,12 +118,12 @@ public class ToolBiometricCardRender implements IItemRenderer
col = AEColor.Black;
}
float z = 0;
for( int x = 0; x < 8; x++ )// 8
{
for( int y = 0; y < 6; y++ )// 6
{
boolean isLit = false;
float scale = 0.3f / 255.0f;
if( x == 0 || y == 0 || x == 7 || y == 5 )
{
@@ -141,6 +140,7 @@ public class ToolBiometricCardRender implements IItemRenderer
}
else
{
float scale = 0.3f / 255.0f;
tessellator.setColorOpaque_F( ( ( col.blackVariant >> 16 ) & 0xff ) * scale, ( ( col.blackVariant >> 8 ) & 0xff ) * scale, ( col.blackVariant & 0xff ) * scale );
}
@@ -56,7 +56,6 @@ public class ToolColorApplicatorRender implements IItemRenderer
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance;
GL11.glPushMatrix();
@@ -92,6 +91,7 @@ public class ToolColorApplicatorRender implements IItemRenderer
{
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
}
float f12 = 0.0625F;
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
@@ -112,9 +112,7 @@ public class ToolColorApplicatorRender implements IItemRenderer
}
GL11.glDisable( GL11.GL_LIGHTING );
AEColor col = null;
col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
AEColor col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
if( col != null )
{