Deleted unnecessary casts with Eclipse

This commit is contained in:
Andrew
2014-09-28 11:56:16 -07:00
parent 94d5319038
commit da63aca95c
89 changed files with 348 additions and 360 deletions
+13 -14
View File
@@ -11,7 +11,6 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
@@ -115,9 +114,9 @@ public class ClientHelper extends ServerHelper
{
AEColor col = player.myColor;
float r = (float) (0xff & (col.mediumVariant >> 16));
float g = (float) (0xff & (col.mediumVariant >> 8));
float b = (float) (0xff & (col.mediumVariant));
float r = 0xff & (col.mediumVariant >> 16);
float g = 0xff & (col.mediumVariant >> 8);
float b = 0xff & (col.mediumVariant);
GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f );
}
}
@@ -192,7 +191,7 @@ public class ClientHelper extends ServerHelper
RenderItem.renderInFrame = false;
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
if ( !ForgeHooksClient.renderInventoryItem( blockRenderer, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, (float) 0, (float) 0 ) )
if ( !ForgeHooksClient.renderInventoryItem( blockRenderer, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, 0, 0 ) )
{
itemRenderer.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
}
@@ -323,32 +322,32 @@ public class ClientHelper extends ServerHelper
PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
private void spawnVibrant(World w, double x, double y, double z)
{
if ( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
{
double d0 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
double d1 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
double d2 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
double d0 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
double d1 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
double d2 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
VibrantFX fx = new VibrantFX( w, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
}
private void spawnLightningArc(World worldObj, double posX, double posY, double posZ, Vec3 second)
{
LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
private void spawnLightning(World worldObj, double posX, double posY, double posZ)
{
LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
private void spawnEnergy(World w, double posX, double posY, double posZ)
@@ -363,7 +362,7 @@ public class ClientHelper extends ServerHelper
fx.motionY = -y * 0.1;
fx.motionZ = -z * 0.1;
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
private void spawnCrafting(World w, double posX, double posY, double posZ)
@@ -378,7 +377,7 @@ public class ClientHelper extends ServerHelper
fx.motionY = -y * 0.2;
fx.motionZ = -z * 0.2;
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
@Override
+10 -10
View File
@@ -560,7 +560,7 @@ public abstract class AEBaseGui extends GuiContainer
for (var6 = 0; var6 < var4.length; ++var6)
{
var7 = fontRendererObj.getStringWidth( (String) var4[var6] );
var7 = fontRendererObj.getStringWidth( var4[var6] );
if ( var7 > var5 )
{
@@ -602,7 +602,7 @@ public abstract class AEBaseGui extends GuiContainer
for (int var13 = 0; var13 < var4.length; ++var13)
{
String var14 = (String) var4[var13];
String var14 = var4[var13];
if ( var13 == 0 )
{
@@ -877,14 +877,14 @@ public abstract class AEBaseGui extends GuiContainer
float f1 = 0.00390625F;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
tessellator.addVertexWithUV( (double) (par1 + 0), (double) (par2 + par6), (double) this.zLevel, (double) ((float) (par3 + 0) * f),
(double) ((float) (par4 + par6) * f1) );
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + par6), (double) this.zLevel,
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + par6) * f1) );
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + 0), (double) this.zLevel,
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + 0) * f1) );
tessellator.addVertexWithUV( (double) (par1 + 0), (double) (par2 + 0), (double) this.zLevel, (double) ((float) (par3 + 0) * f),
(double) ((float) (par4 + 0) * f1) );
tessellator.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, (par3 + 0) * f,
(par4 + par6) * f1 );
tessellator.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel,
(par3 + par5) * f, (par4 + par6) * f1 );
tessellator.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel,
(par3 + par5) * f, (par4 + 0) * f1 );
tessellator.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, (par3 + 0) * f,
(par4 + 0) * f1 );
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
tessellator.draw();
}
@@ -423,8 +423,8 @@ public class GuiCraftConfirm extends AEBaseGui
str = GuiText.FromStorage.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( str );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
+ 6 - negY + downY) * 2), 4210752 );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart )
lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
@@ -442,8 +442,8 @@ public class GuiCraftConfirm extends AEBaseGui
str = GuiText.Missing.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( str );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
+ 6 - negY + downY) * 2), 4210752 );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart )
lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) );
@@ -462,8 +462,8 @@ public class GuiCraftConfirm extends AEBaseGui
str = GuiText.ToCraft.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( str );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
+ 6 - negY + downY) * 2), 4210752 );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart )
lineList.add( GuiText.ToCraft.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
@@ -309,8 +309,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
str = GuiText.Stored.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( str );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
+ 6 - negY + downY) * 2), 4210752 );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart )
lineList.add( GuiText.Stored.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
@@ -328,8 +328,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
str = GuiText.Crafting.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( str );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
+ 6 - negY + downY) * 2), 4210752 );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart )
lineList.add( GuiText.Crafting.getLocal() + ": " + Long.toString( activeStack.getStackSize() ) );
@@ -347,8 +347,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
str = GuiText.Scheduled.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( str );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
+ 6 - negY + downY) * 2), 4210752 );
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart )
lineList.add( GuiText.Scheduled.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
@@ -197,7 +197,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.ySize = magicNumber + rows * 18 + reservedSpace;
// this.guiTop = top;
int unusedSpace = height - ySize;
guiTop = (int) Math.floor( (float) unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f) );
guiTop = (int) Math.floor( unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f) );
int offset = guiTop + 8;
@@ -171,7 +171,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
str = Long.toString( refStack.getStackSize() / 1000 ) + "k";
int w = fontRendererObj.getStringWidth( str );
fontRendererObj.drawString( str, (int) ((x * sectionLength + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * 18 + yo + 6) * 2),
fontRendererObj.drawString( str, (int) ((x * sectionLength + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * 18 + yo + 6) * 2,
4210752 );
GL11.glPopMatrix();
@@ -38,7 +38,7 @@ public class GuiUpgradeable extends AEBaseGui
public GuiUpgradeable(ContainerUpgradeable te) {
super( te );
cvb = (ContainerUpgradeable) te;
cvb = te;
bc = (IUpgradeableHost) te.getTarget();
this.xSize = hasToolbox() ? 246 : 211;
@@ -64,7 +64,7 @@ public class GuiWireless extends AEBaseGui
if ( cw.range > 0 )
{
String firstMessage = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m";
String firstMessage = GuiText.Range.getLocal() + ": " + (cw.range / 10.0) + " m";
String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) );
@@ -725,9 +725,9 @@ public class BaseBlockRender
return 0;
if ( offset > 0 )
return (double) uv / 16.0;
return uv / 16.0;
return (16.0 - (double) uv) / 16.0;
return (16.0 - uv) / 16.0;
}
public void renderTile(AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer)
@@ -310,10 +310,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{
Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinZ * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d3 = par8Icon.getInterpolatedU( this.renderMinZ * 16.0D );
double d4 = par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D );
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMinX;
double d12 = par4 + this.renderMinY;
@@ -364,10 +364,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{
Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D );
double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D );
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMaxX;
double d12 = par4 + this.renderMinY;
@@ -446,10 +446,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{
Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX;
@@ -500,10 +500,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{
Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX;
@@ -554,10 +554,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{
Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D );
double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D );
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX;
@@ -608,10 +608,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{
Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX;
@@ -121,10 +121,10 @@ public class SpatialSkyRender extends IRenderHandler
for (int i = 0; i < 50; ++i)
{
double iX = (double) (random.nextFloat() * 2.0F - 1.0F);
double iY = (double) (random.nextFloat() * 2.0F - 1.0F);
double iZ = (double) (random.nextFloat() * 2.0F - 1.0F);
double d3 = (double) (0.05F + random.nextFloat() * 0.1F);
double iX = random.nextFloat() * 2.0F - 1.0F;
double iY = random.nextFloat() * 2.0F - 1.0F;
double iZ = random.nextFloat() * 2.0F - 1.0F;
double d3 = 0.05F + random.nextFloat() * 0.1F;
double dist = iX * iX + iY * iY + iZ * iZ;
if ( dist < 1.0D && dist > 0.01D )
@@ -149,8 +149,8 @@ public class SpatialSkyRender extends IRenderHandler
for (int j = 0; j < 4; ++j)
{
double d17 = 0.0D;
double d18 = (double) ((j & 2) - 1) * d3;
double d19 = (double) ((j + 1 & 2) - 1) * d3;
double d18 = ((j & 2) - 1) * d3;
double d19 = ((j + 1 & 2) - 1) * d3;
double d20 = d18 * d16 - d19 * d15;
double d21 = d19 * d16 + d18 * d15;
double d22 = d20 * d12 + d17 * d13;
@@ -36,7 +36,7 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
if ( ne instanceof IGridHost && ne instanceof IPartHost )
{
IPartHost ph = (IPartHost) ne;
IPart pcx = (IPart) ph.getPart( ForgeDirection.UNKNOWN );
IPart pcx = ph.getPart( ForgeDirection.UNKNOWN );
if ( pcx instanceof PartCable )
{
PartCable pc = (PartCable) pcx;
@@ -36,7 +36,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
if ( tile instanceof TileCraftingMonitorTile )
{
TileCraftingMonitorTile cmt = (TileCraftingMonitorTile) tile;
IAEItemStack ais = (IAEItemStack) cmt.getJobProgress();
IAEItemStack ais = cmt.getJobProgress();
if ( cmt.dspList == null )
{
@@ -89,14 +89,14 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
{
GL11.glScalef( 1.0f, -1.0f, 1.0f );
GL11.glRotatef( 90.0f, 1.0f, 0.0f, 0.0f );
GL11.glRotatef( (float) spin * 90.0F, 0, 0, 1 );
GL11.glRotatef( spin * 90.0F, 0, 0, 1 );
}
if ( d == ForgeDirection.DOWN )
{
GL11.glScalef( 1.0f, -1.0f, 1.0f );
GL11.glRotatef( -90.0f, 1.0f, 0.0f, 0.0f );
GL11.glRotatef( (float) spin * -90.0F, 0, 0, 1 );
GL11.glRotatef( spin * -90.0F, 0, 0, 1 );
}
if ( d == ForgeDirection.EAST )
@@ -153,7 +153,7 @@ public class RenderBlockInscriber extends BaseBlockRender
inv.smash = false;
}
float relativeProgress = (float) (absoluteProgress % 800) / 400.0f;
float relativeProgress = absoluteProgress % 800 / 400.0f;
float progress = relativeProgress;
if ( progress > 1.0f )
@@ -101,7 +101,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
if ( cr.spin )
{
now = now % 100000;
model.renderAll( ((float) now / 50000.0f) * (float) Math.PI * 500.0f );
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
}
else
{
@@ -122,14 +122,14 @@ public class RenderBlockSkyCompass extends BaseBlockRender
else
{
now = now % 1000000;
model.renderAll( ((float) now / 500000.0f) * (float) Math.PI * 500.0f );
model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
}
}
else
{
now = now % 100000;
model.renderAll( ((float) now / 50000.0f) * (float) Math.PI * 500.0f );
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
}
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
@@ -178,7 +178,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
if ( cr.spin )
{
now = now % 100000;
model.renderAll( ((float) now / 50000.0f) * (float) Math.PI * 500.0f );
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
}
else
model.renderAll( (float) (skyCompass.getForward() == ForgeDirection.DOWN ? flipidiy( cr.rad ) : cr.rad) );
@@ -187,7 +187,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
else
{
now = now % 1000000;
model.renderAll( ((float) now / 500000.0f) * (float) Math.PI * 500.0f );
model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
}
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
@@ -71,9 +71,9 @@ public class CraftingFx extends EntityBreakingFX
float f9 = this.particleTextureIndex.getMaxV();
float scale = 0.1F * this.particleScale;
float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick);
float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick);
float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick);
float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * partialTick);
float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * partialTick);
float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * partialTick);
float f14 = 1.0F;
int blkX = MathHelper.floor_double( offX );
@@ -87,14 +87,14 @@ public class CraftingFx extends EntityBreakingFX
// AELog.info( "" + partialTick );
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( (double) (offX - x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ - z * scale - rz * scale),
(double) f7, (double) f9 );
par1Tessellator.addVertexWithUV( (double) (offX - x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ - z * scale + rz * scale),
(double) f7, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (offX + x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ + z * scale + rz * scale),
(double) f6, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (offX + x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ + z * scale - rz * scale),
(double) f6, (double) f9 );
par1Tessellator.addVertexWithUV( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale,
f7, f9 );
par1Tessellator.addVertexWithUV( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale,
f7, f8 );
par1Tessellator.addVertexWithUV( offX + x * scale + rx * scale, offY + y * scale, offZ + z * scale + rz * scale,
f6, f8 );
par1Tessellator.addVertexWithUV( offX + x * scale - rx * scale, offY - y * scale, offZ + z * scale - rz * scale,
f6, f9 );
}
}
@@ -67,9 +67,9 @@ public class EnergyFx extends EntityBreakingFX
float f9 = this.particleTextureIndex.getMaxV();
float f10 = 0.1F * this.particleScale;
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
float f14 = 1.0F;
int blkX = MathHelper.floor_double( posX );
@@ -79,14 +79,14 @@ public class EnergyFx extends EntityBreakingFX
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
{
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 - par5 * f10 - par7 * f10),
(double) f7, (double) f9 );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 - par5 * f10 + par7 * f10),
(double) f7, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 + par5 * f10 + par7 * f10),
(double) f6, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10),
(double) f6, (double) f9 );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10,
f7, f9 );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10,
f7, f8 );
par1Tessellator.addVertexWithUV( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10,
f6, f8 );
par1Tessellator.addVertexWithUV( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10,
f6, f9 );
}
}
@@ -111,9 +111,9 @@ public class LightningFX extends EntityFX
{
clear();
double x = (this.prevPosX + (this.posX - this.prevPosX) * (double) l - interpPosX) - offX;
double y = (this.prevPosY + (this.posY - this.prevPosY) * (double) l - interpPosY) - offY;
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) l - interpPosZ) - offZ;
double x = (this.prevPosX + (this.posX - this.prevPosX) * l - interpPosX) - offX;
double y = (this.prevPosY + (this.posY - this.prevPosY) * l - interpPosY) - offY;
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * l - interpPosZ) - offZ;
for (int s = 0; s < steps; s++)
{
@@ -144,7 +144,7 @@ public class LightningFX extends EntityFX
oz = (xD * 0) - (1 * yD);
}
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) steps - (double) s) / (double) steps) * scale);
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) steps - (double) s) / steps) * scale);
ox /= ss;
oy /= ss;
oz /= ss;
@@ -55,20 +55,20 @@ public class MatterCannonFX extends EntityBreakingFX
float f9 = this.particleTextureIndex.getMaxV();
float f10 = 0.05F * this.particleScale;
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
float f14 = 1.0F;
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 - par5 * f10 - par7 * f10),
(double) f7, (double) f9 );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 - par5 * f10 + par7 * f10),
(double) f7, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 + par5 * f10 + par7 * f10),
(double) f6, (double) f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10),
(double) f6, (double) f9 );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10,
f7, f9 );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10,
f7, f8 );
par1Tessellator.addVertexWithUV( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10,
f6, f8 );
par1Tessellator.addVertexWithUV( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10,
f6, f9 );
}
}
@@ -34,10 +34,10 @@ public class PaintBallRender implements IItemRenderer
if ( item.getItemDamage() >= 20 )
par2Icon = ExtraItemTextures.ItemPaintBallShimmer.getIcon();
float f4 = ((IIcon) par2Icon).getMinU();
float f5 = ((IIcon) par2Icon).getMaxU();
float f6 = ((IIcon) par2Icon).getMinV();
float f7 = ((IIcon) par2Icon).getMaxV();
float f4 = par2Icon.getMinU();
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
ItemPaintBall ipb = (ItemPaintBall) item.getItem();
@@ -70,10 +70,10 @@ public class PaintBallRender implements IItemRenderer
tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 );
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 );
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw();
}
else
@@ -82,7 +82,7 @@ public class PaintBallRender implements IItemRenderer
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
else
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12 );
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F );
@@ -34,10 +34,10 @@ public class ToolBiometricCardRender implements IItemRenderer
{
IIcon par2Icon = item.getIconIndex();
float f4 = ((IIcon) par2Icon).getMinU();
float f5 = ((IIcon) par2Icon).getMaxU();
float f6 = ((IIcon) par2Icon).getMinV();
float f7 = ((IIcon) par2Icon).getMaxV();
float f4 = par2Icon.getMinU();
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance;
@@ -54,16 +54,16 @@ public class ToolBiometricCardRender implements IItemRenderer
tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 );
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 );
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw();
}
else
{
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12 );
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F );
@@ -113,10 +113,10 @@ public class ToolBiometricCardRender implements IItemRenderer
tessellator.setColorOpaque_F( ((col.blackVariant >> 16) & 0xff) * scale, ((col.blackVariant >> 8) & 0xff) * scale,
(col.blackVariant & 0xff) * scale );
tessellator.addVertexWithUV( x, y, z, (double) u, (double) v );
tessellator.addVertexWithUV( x + 1, y, z, (double) u, (double) v );
tessellator.addVertexWithUV( x + 1, y + 1, z, (double) u, (double) v );
tessellator.addVertexWithUV( x, y + 1, z, (double) u, (double) v );
tessellator.addVertexWithUV( x, y, z, u, v );
tessellator.addVertexWithUV( x + 1, y, z, u, v );
tessellator.addVertexWithUV( x + 1, y + 1, z, u, v );
tessellator.addVertexWithUV( x, y + 1, z, u, v );
}
}
tessellator.draw();
@@ -32,10 +32,10 @@ public class ToolColorApplicatorRender implements IItemRenderer
{
IIcon par2Icon = item.getIconIndex();
float f4 = ((IIcon) par2Icon).getMinU();
float f5 = ((IIcon) par2Icon).getMaxU();
float f6 = ((IIcon) par2Icon).getMinV();
float f7 = ((IIcon) par2Icon).getMaxV();
float f4 = par2Icon.getMinU();
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance;
@@ -52,10 +52,10 @@ public class ToolColorApplicatorRender implements IItemRenderer
tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 );
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 );
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw();
}
else
@@ -66,7 +66,7 @@ public class ToolColorApplicatorRender implements IItemRenderer
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
else
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12 );
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F );
@@ -92,38 +92,38 @@ public class ToolColorApplicatorRender implements IItemRenderer
{
tessellator.startDrawingQuads();
f4 = ((IIcon) dark).getMinU();
f5 = ((IIcon) dark).getMaxU();
f6 = ((IIcon) dark).getMinV();
f7 = ((IIcon) dark).getMaxV();
f4 = dark.getMinU();
f5 = dark.getMaxU();
f6 = dark.getMinV();
f7 = dark.getMaxV();
tessellator.setColorOpaque_I( col.blackVariant );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 );
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 );
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
f4 = ((IIcon) light).getMinU();
f5 = ((IIcon) light).getMaxU();
f6 = ((IIcon) light).getMinV();
f7 = ((IIcon) light).getMaxV();
f4 = light.getMinU();
f5 = light.getMaxU();
f6 = light.getMinV();
f7 = light.getMaxV();
tessellator.setColorOpaque_I( col.whiteVariant );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 );
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 );
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
f4 = ((IIcon) med).getMinU();
f5 = ((IIcon) med).getMaxU();
f6 = ((IIcon) med).getMinV();
f7 = ((IIcon) med).getMaxV();
f4 = med.getMinU();
f5 = med.getMaxU();
f6 = med.getMinV();
f7 = med.getMaxV();
tessellator.setColorOpaque_I( col.mediumVariant );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 );
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 );
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
tessellator.draw();
}