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
@@ -84,7 +84,7 @@ public class AEBaseItemBlock extends ItemBlock
{ {
up = ForgeDirection.UP; up = ForgeDirection.UP;
byte rotation = (byte) (MathHelper.floor_double( (double) ((player.rotationYaw * 4F) / 360F) + 2.5D ) & 3); byte rotation = (byte) (MathHelper.floor_double( (player.rotationYaw * 4F) / 360F + 2.5D ) & 3);
switch (rotation) switch (rotation)
{ {
@@ -7,7 +7,6 @@ import java.util.Random;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
@@ -89,7 +88,7 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
if ( CommonHelper.proxy.shouldAddParticles( r ) ) if ( CommonHelper.proxy.shouldAddParticles( r ) )
{ {
LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D ); LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
@@ -33,7 +33,7 @@ public class BlockLightDetector extends BlockQuartzTorch
public int isProvidingWeakPower(IBlockAccess w, int x, int y, int z, int side) public int isProvidingWeakPower(IBlockAccess w, int x, int y, int z, int side)
{ {
if ( w instanceof World && ((TileLightDetector) getTileEntity( w, x, y, z )).isReady() ) if ( w instanceof World && ((TileLightDetector) getTileEntity( w, x, y, z )).isReady() )
return (int) ((World) w).getBlockLightValue( x, y, z ) - 6; return ((World) w).getBlockLightValue( x, y, z ) - 6;
return 0; return 0;
} }
@@ -5,7 +5,6 @@ import java.util.Random;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
@@ -56,8 +55,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) ) if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
{ {
double d0 = (double) (r.nextFloat() - 0.5F); double d0 = r.nextFloat() - 0.5F;
double d1 = (double) (r.nextFloat() - 0.5F); double d1 = r.nextFloat() - 0.5F;
ForgeDirection up = tileQuartzGrowthAccelerator.getUp(); ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward(); ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
@@ -113,7 +112,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
rz += dz * forward.offsetZ; rz += dz * forward.offsetZ;
LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D ); LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
@@ -8,7 +8,6 @@ import java.util.Random;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
@@ -129,7 +128,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
{ {
LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D ); LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
} }
@@ -73,9 +73,9 @@ public class BlockVibrationChamber extends AEBaseBlock
TileVibrationChamber tc = (TileVibrationChamber) tile; TileVibrationChamber tc = (TileVibrationChamber) tile;
if ( tc.isOn ) if ( tc.isOn )
{ {
float f1 = (float) x + 0.5F; float f1 = x + 0.5F;
float f2 = (float) y + 0.5F; float f2 = y + 0.5F;
float f3 = (float) z + 0.5F; float f3 = z + 0.5F;
ForgeDirection forward = tc.getForward(); ForgeDirection forward = tc.getForward();
ForgeDirection up = tc.getUp(); ForgeDirection up = tc.getUp();
@@ -99,8 +99,8 @@ public class BlockVibrationChamber extends AEBaseBlock
f2 += west_y * (0.3 * ox - 0.15); f2 += west_y * (0.3 * ox - 0.15);
f3 += west_z * (0.3 * ox - 0.15); f3 += west_z * (0.3 * ox - 0.15);
w.spawnParticle( "smoke", (double) f1, (double) f2, (double) f3, 0.0D, 0.0D, 0.0D ); w.spawnParticle( "smoke", f1, f2, f3, 0.0D, 0.0D, 0.0D );
w.spawnParticle( "flame", (double) f1, (double) f2, (double) f3, 0.0D, 0.0D, 0.0D ); w.spawnParticle( "flame", f1, f2, f3, 0.0D, 0.0D, 0.0D );
} }
} }
} }
@@ -115,15 +115,15 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
{ {
for (int k1 = 0; k1 < b0; ++k1) for (int k1 = 0; k1 < b0; ++k1)
{ {
double d0 = (double) target.blockX + ((double) i1 + 0.5D) / (double) b0; double d0 = target.blockX + (i1 + 0.5D) / b0;
double d1 = (double) target.blockY + ((double) j1 + 0.5D) / (double) b0; double d1 = target.blockY + (j1 + 0.5D) / b0;
double d2 = (double) target.blockZ + ((double) k1 + 0.5D) / (double) b0; double d2 = target.blockZ + (k1 + 0.5D) / b0;
double dd0 = target.hitVec.xCoord; double dd0 = target.hitVec.xCoord;
double dd1 = target.hitVec.yCoord; double dd1 = target.hitVec.yCoord;
double dd2 = target.hitVec.zCoord; double dd2 = target.hitVec.zCoord;
EntityDiggingFX fx = (new EntityDiggingFX( world, dd0, dd1, dd2, d0 - (double) target.blockX - 0.5D, d1 - (double) target.blockY EntityDiggingFX fx = (new EntityDiggingFX( world, dd0, dd1, dd2, d0 - target.blockX - 0.5D, d1 - target.blockY
- 0.5D, d2 - (double) target.blockZ - 0.5D, this, 0 )).applyColourMultiplier( target.blockX, target.blockY, target.blockZ ); - 0.5D, d2 - target.blockZ - 0.5D, this, 0 )).applyColourMultiplier( target.blockX, target.blockY, target.blockZ );
fx.setParticleIcon( ico ); fx.setParticleIcon( ico );
@@ -162,10 +162,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
{ {
for (int k1 = 0; k1 < b0; ++k1) for (int k1 = 0; k1 < b0; ++k1)
{ {
double d0 = (double) x + ((double) i1 + 0.5D) / (double) b0; double d0 = x + (i1 + 0.5D) / b0;
double d1 = (double) y + ((double) j1 + 0.5D) / (double) b0; double d1 = y + (j1 + 0.5D) / b0;
double d2 = (double) z + ((double) k1 + 0.5D) / (double) b0; double d2 = z + (k1 + 0.5D) / b0;
EntityDiggingFX fx = (new EntityDiggingFX( world, d0, d1, d2, d0 - (double) x - 0.5D, d1 - (double) y - 0.5D, d2 - (double) z EntityDiggingFX fx = (new EntityDiggingFX( world, d0, d1, d2, d0 - x - 0.5D, d1 - y - 0.5D, d2 - z
- 0.5D, this, meta )).applyColourMultiplier( x, y, z ); - 0.5D, this, meta )).applyColourMultiplier( x, y, z );
fx.setParticleIcon( ico ); fx.setParticleIcon( ico );
@@ -4,7 +4,6 @@ import java.util.EnumSet;
import java.util.Random; import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.client.render.effects.VibrantFX; import appeng.client.render.effects.VibrantFX;
import appeng.core.AEConfig; import appeng.core.AEConfig;
@@ -32,13 +31,13 @@ public class BlockQuartzLamp extends BlockQuartzGlass
if ( CommonHelper.proxy.shouldAddParticles( r ) ) if ( CommonHelper.proxy.shouldAddParticles( r ) )
{ {
double d0 = (double) (r.nextFloat() - 0.5F) * 0.96D; double d0 = (r.nextFloat() - 0.5F) * 0.96D;
double d1 = (double) (r.nextFloat() - 0.5F) * 0.96D; double d1 = (r.nextFloat() - 0.5F) * 0.96D;
double d2 = (double) (r.nextFloat() - 0.5F) * 0.96D; double d2 = (r.nextFloat() - 0.5F) * 0.96D;
VibrantFX fx = new VibrantFX( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D ); VibrantFX fx = new VibrantFX( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
@@ -3,7 +3,6 @@ package appeng.block.solids;
import java.util.Random; import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.api.AEApi; import appeng.api.AEApi;
@@ -35,9 +34,9 @@ public class OreQuartzCharged extends OreQuartz
if ( !AEConfig.instance.enableEffects ) if ( !AEConfig.instance.enableEffects )
return; return;
double xOff = (double) (r.nextFloat()); double xOff = (r.nextFloat());
double yOff = (double) (r.nextFloat()); double yOff = (r.nextFloat());
double zOff = (double) (r.nextFloat()); double zOff = (r.nextFloat());
switch (r.nextInt( 6 )) switch (r.nextInt( 6 ))
{ {
@@ -67,7 +66,7 @@ public class OreQuartzCharged extends OreQuartz
if ( CommonHelper.proxy.shouldAddParticles( r ) ) if ( CommonHelper.proxy.shouldAddParticles( r ) )
{ {
ChargedOreFX fx = new ChargedOreFX( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f ); ChargedOreFX fx = new ChargedOreFX( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
+13 -14
View File
@@ -11,7 +11,6 @@ import java.util.Random;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderManager;
@@ -115,9 +114,9 @@ public class ClientHelper extends ServerHelper
{ {
AEColor col = player.myColor; AEColor col = player.myColor;
float r = (float) (0xff & (col.mediumVariant >> 16)); float r = 0xff & (col.mediumVariant >> 16);
float g = (float) (0xff & (col.mediumVariant >> 8)); float g = 0xff & (col.mediumVariant >> 8);
float b = (float) (0xff & (col.mediumVariant)); float b = 0xff & (col.mediumVariant);
GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f ); GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f );
} }
} }
@@ -192,7 +191,7 @@ public class ClientHelper extends ServerHelper
RenderItem.renderInFrame = false; RenderItem.renderInFrame = false;
FontRenderer fr = Minecraft.getMinecraft().fontRenderer; 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 ); itemRenderer.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
} }
@@ -323,32 +322,32 @@ public class ClientHelper extends ServerHelper
PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o; PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is ); 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) private void spawnVibrant(World w, double x, double y, double z)
{ {
if ( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) ) if ( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
{ {
double d0 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D; double d0 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
double d1 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D; double d1 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
double d2 = (double) (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 ); 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) 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 ); 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) 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 ); 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) 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.motionY = -y * 0.1;
fx.motionZ = -z * 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) 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.motionY = -y * 0.2;
fx.motionZ = -z * 0.2; fx.motionZ = -z * 0.2;
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
@Override @Override
+10 -10
View File
@@ -560,7 +560,7 @@ public abstract class AEBaseGui extends GuiContainer
for (var6 = 0; var6 < var4.length; ++var6) for (var6 = 0; var6 < var4.length; ++var6)
{ {
var7 = fontRendererObj.getStringWidth( (String) var4[var6] ); var7 = fontRendererObj.getStringWidth( var4[var6] );
if ( var7 > var5 ) if ( var7 > var5 )
{ {
@@ -602,7 +602,7 @@ public abstract class AEBaseGui extends GuiContainer
for (int var13 = 0; var13 < var4.length; ++var13) for (int var13 = 0; var13 < var4.length; ++var13)
{ {
String var14 = (String) var4[var13]; String var14 = var4[var13];
if ( var13 == 0 ) if ( var13 == 0 )
{ {
@@ -877,14 +877,14 @@ public abstract class AEBaseGui extends GuiContainer
float f1 = 0.00390625F; float f1 = 0.00390625F;
tessellator.startDrawingQuads(); tessellator.startDrawingQuads();
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ); 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), tessellator.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, (par3 + 0) * f,
(double) ((float) (par4 + par6) * f1) ); (par4 + par6) * f1 );
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + par6), (double) this.zLevel, tessellator.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel,
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + par6) * f1) ); (par3 + par5) * f, (par4 + par6) * f1 );
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + 0), (double) this.zLevel, tessellator.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel,
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + 0) * f1) ); (par3 + par5) * f, (par4 + 0) * f1 );
tessellator.addVertexWithUV( (double) (par1 + 0), (double) (par2 + 0), (double) this.zLevel, (double) ((float) (par3 + 0) * f), tessellator.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, (par3 + 0) * f,
(double) ((float) (par4 + 0) * f1) ); (par4 + 0) * f1 );
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f ); tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
tessellator.draw(); tessellator.draw();
} }
@@ -423,8 +423,8 @@ public class GuiCraftConfirm extends AEBaseGui
str = GuiText.FromStorage.getLocal() + ": " + str; str = GuiText.FromStorage.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( 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 fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2), 4210752 ); + 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart ) if ( tooltip == z - viewStart )
lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) ); lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
@@ -442,8 +442,8 @@ public class GuiCraftConfirm extends AEBaseGui
str = GuiText.Missing.getLocal() + ": " + str; str = GuiText.Missing.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( 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 fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2), 4210752 ); + 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart ) if ( tooltip == z - viewStart )
lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) ); lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) );
@@ -462,8 +462,8 @@ public class GuiCraftConfirm extends AEBaseGui
str = GuiText.ToCraft.getLocal() + ": " + str; str = GuiText.ToCraft.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( 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 fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2), 4210752 ); + 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart ) if ( tooltip == z - viewStart )
lineList.add( GuiText.ToCraft.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) ); 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; str = GuiText.Stored.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( 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 fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2), 4210752 ); + 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart ) if ( tooltip == z - viewStart )
lineList.add( GuiText.Stored.getLocal() + ": " + Long.toString( stored.getStackSize() ) ); 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; str = GuiText.Crafting.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( 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 fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2), 4210752 ); + 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart ) if ( tooltip == z - viewStart )
lineList.add( GuiText.Crafting.getLocal() + ": " + Long.toString( activeStack.getStackSize() ) ); 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; str = GuiText.Scheduled.getLocal() + ": " + str;
int w = 4 + fontRendererObj.getStringWidth( 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 fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
+ 6 - negY + downY) * 2), 4210752 ); + 6 - negY + downY) * 2, 4210752 );
if ( tooltip == z - viewStart ) if ( tooltip == z - viewStart )
lineList.add( GuiText.Scheduled.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) ); 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.ySize = magicNumber + rows * 18 + reservedSpace;
// this.guiTop = top; // this.guiTop = top;
int unusedSpace = height - ySize; 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; int offset = guiTop + 8;
@@ -171,7 +171,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
str = Long.toString( refStack.getStackSize() / 1000 ) + "k"; str = Long.toString( refStack.getStackSize() / 1000 ) + "k";
int w = fontRendererObj.getStringWidth( str ); 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 ); 4210752 );
GL11.glPopMatrix(); GL11.glPopMatrix();
@@ -38,7 +38,7 @@ public class GuiUpgradeable extends AEBaseGui
public GuiUpgradeable(ContainerUpgradeable te) { public GuiUpgradeable(ContainerUpgradeable te) {
super( te ); super( te );
cvb = (ContainerUpgradeable) te; cvb = te;
bc = (IUpgradeableHost) te.getTarget(); bc = (IUpgradeableHost) te.getTarget();
this.xSize = hasToolbox() ? 246 : 211; this.xSize = hasToolbox() ? 246 : 211;
@@ -64,7 +64,7 @@ public class GuiWireless extends AEBaseGui
if ( cw.range > 0 ) 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 ); String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) ); int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) );
@@ -725,9 +725,9 @@ public class BaseBlockRender
return 0; return 0;
if ( offset > 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) 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; Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinZ * 16.0D ); double d3 = par8Icon.getInterpolatedU( this.renderMinZ * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D ); double d4 = par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D ); double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D ); double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMinX; double d11 = par2 + this.renderMinX;
double d12 = par4 + this.renderMinY; double d12 = par4 + this.renderMinY;
@@ -364,10 +364,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D ); double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D ); double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D ); double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D ); double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMaxX; double d11 = par2 + this.renderMaxX;
double d12 = par4 + this.renderMinY; double d12 = par4 + this.renderMinY;
@@ -446,10 +446,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D ); double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D ); double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( this.renderMinZ * 16.0D ); double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D ); double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
double d11 = par2 + this.renderMinX; double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX; double d12 = par2 + this.renderMaxX;
@@ -500,10 +500,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D ); double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D ); double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( this.renderMinZ * 16.0D ); double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D ); double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
double d11 = par2 + this.renderMinX; double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX; double d12 = par2 + this.renderMaxX;
@@ -554,10 +554,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D ); double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D ); double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D ); double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D ); double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMinX; double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX; double d12 = par2 + this.renderMaxX;
@@ -608,10 +608,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
{ {
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D ); double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D ); double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D ); double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D ); double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
double d11 = par2 + this.renderMinX; double d11 = par2 + this.renderMinX;
double d12 = par2 + this.renderMaxX; double d12 = par2 + this.renderMaxX;
@@ -121,10 +121,10 @@ public class SpatialSkyRender extends IRenderHandler
for (int i = 0; i < 50; ++i) for (int i = 0; i < 50; ++i)
{ {
double iX = (double) (random.nextFloat() * 2.0F - 1.0F); double iX = random.nextFloat() * 2.0F - 1.0F;
double iY = (double) (random.nextFloat() * 2.0F - 1.0F); double iY = random.nextFloat() * 2.0F - 1.0F;
double iZ = (double) (random.nextFloat() * 2.0F - 1.0F); double iZ = random.nextFloat() * 2.0F - 1.0F;
double d3 = (double) (0.05F + random.nextFloat() * 0.1F); double d3 = 0.05F + random.nextFloat() * 0.1F;
double dist = iX * iX + iY * iY + iZ * iZ; double dist = iX * iX + iY * iY + iZ * iZ;
if ( dist < 1.0D && dist > 0.01D ) if ( dist < 1.0D && dist > 0.01D )
@@ -149,8 +149,8 @@ public class SpatialSkyRender extends IRenderHandler
for (int j = 0; j < 4; ++j) for (int j = 0; j < 4; ++j)
{ {
double d17 = 0.0D; double d17 = 0.0D;
double d18 = (double) ((j & 2) - 1) * d3; double d18 = ((j & 2) - 1) * d3;
double d19 = (double) ((j + 1 & 2) - 1) * d3; double d19 = ((j + 1 & 2) - 1) * d3;
double d20 = d18 * d16 - d19 * d15; double d20 = d18 * d16 - d19 * d15;
double d21 = d19 * d16 + d18 * d15; double d21 = d19 * d16 + d18 * d15;
double d22 = d20 * d12 + d17 * d13; double d22 = d20 * d12 + d17 * d13;
@@ -36,7 +36,7 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
if ( ne instanceof IGridHost && ne instanceof IPartHost ) if ( ne instanceof IGridHost && ne instanceof IPartHost )
{ {
IPartHost ph = (IPartHost) ne; IPartHost ph = (IPartHost) ne;
IPart pcx = (IPart) ph.getPart( ForgeDirection.UNKNOWN ); IPart pcx = ph.getPart( ForgeDirection.UNKNOWN );
if ( pcx instanceof PartCable ) if ( pcx instanceof PartCable )
{ {
PartCable pc = (PartCable) pcx; PartCable pc = (PartCable) pcx;
@@ -36,7 +36,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
if ( tile instanceof TileCraftingMonitorTile ) if ( tile instanceof TileCraftingMonitorTile )
{ {
TileCraftingMonitorTile cmt = (TileCraftingMonitorTile) tile; TileCraftingMonitorTile cmt = (TileCraftingMonitorTile) tile;
IAEItemStack ais = (IAEItemStack) cmt.getJobProgress(); IAEItemStack ais = cmt.getJobProgress();
if ( cmt.dspList == null ) if ( cmt.dspList == null )
{ {
@@ -89,14 +89,14 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
{ {
GL11.glScalef( 1.0f, -1.0f, 1.0f ); GL11.glScalef( 1.0f, -1.0f, 1.0f );
GL11.glRotatef( 90.0f, 1.0f, 0.0f, 0.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 ) if ( d == ForgeDirection.DOWN )
{ {
GL11.glScalef( 1.0f, -1.0f, 1.0f ); GL11.glScalef( 1.0f, -1.0f, 1.0f );
GL11.glRotatef( -90.0f, 1.0f, 0.0f, 0.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 ) if ( d == ForgeDirection.EAST )
@@ -153,7 +153,7 @@ public class RenderBlockInscriber extends BaseBlockRender
inv.smash = false; inv.smash = false;
} }
float relativeProgress = (float) (absoluteProgress % 800) / 400.0f; float relativeProgress = absoluteProgress % 800 / 400.0f;
float progress = relativeProgress; float progress = relativeProgress;
if ( progress > 1.0f ) if ( progress > 1.0f )
@@ -101,7 +101,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
if ( cr.spin ) if ( cr.spin )
{ {
now = now % 100000; 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 else
{ {
@@ -122,14 +122,14 @@ public class RenderBlockSkyCompass extends BaseBlockRender
else else
{ {
now = now % 1000000; 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 else
{ {
now = now % 100000; 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 */); GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
@@ -178,7 +178,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
if ( cr.spin ) if ( cr.spin )
{ {
now = now % 100000; 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 else
model.renderAll( (float) (skyCompass.getForward() == ForgeDirection.DOWN ? flipidiy( cr.rad ) : cr.rad) ); model.renderAll( (float) (skyCompass.getForward() == ForgeDirection.DOWN ? flipidiy( cr.rad ) : cr.rad) );
@@ -187,7 +187,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
else else
{ {
now = now % 1000000; 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 */); GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
@@ -71,9 +71,9 @@ public class CraftingFx extends EntityBreakingFX
float f9 = this.particleTextureIndex.getMaxV(); float f9 = this.particleTextureIndex.getMaxV();
float scale = 0.1F * this.particleScale; float scale = 0.1F * this.particleScale;
float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick); float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * partialTick);
float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick); float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * partialTick);
float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick); float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * partialTick);
float f14 = 1.0F; float f14 = 1.0F;
int blkX = MathHelper.floor_double( offX ); int blkX = MathHelper.floor_double( offX );
@@ -87,14 +87,14 @@ public class CraftingFx extends EntityBreakingFX
// AELog.info( "" + partialTick ); // AELog.info( "" + partialTick );
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ); 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), par1Tessellator.addVertexWithUV( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale,
(double) f7, (double) f9 ); f7, f9 );
par1Tessellator.addVertexWithUV( (double) (offX - x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ - z * scale + rz * scale), par1Tessellator.addVertexWithUV( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale,
(double) f7, (double) f8 ); f7, f8 );
par1Tessellator.addVertexWithUV( (double) (offX + x * scale + rx * scale), (double) (offY + y * scale), (double) (offZ + z * scale + rz * scale), par1Tessellator.addVertexWithUV( offX + x * scale + rx * scale, offY + y * scale, offZ + z * scale + rz * scale,
(double) f6, (double) f8 ); f6, f8 );
par1Tessellator.addVertexWithUV( (double) (offX + x * scale - rx * scale), (double) (offY - y * scale), (double) (offZ + z * scale - rz * scale), par1Tessellator.addVertexWithUV( offX + x * scale - rx * scale, offY - y * scale, offZ + z * scale - rz * scale,
(double) f6, (double) f9 ); f6, f9 );
} }
} }
@@ -67,9 +67,9 @@ public class EnergyFx extends EntityBreakingFX
float f9 = this.particleTextureIndex.getMaxV(); float f9 = this.particleTextureIndex.getMaxV();
float f10 = 0.1F * this.particleScale; float f10 = 0.1F * this.particleScale;
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
float f14 = 1.0F; float f14 = 1.0F;
int blkX = MathHelper.floor_double( posX ); int blkX = MathHelper.floor_double( posX );
@@ -79,14 +79,14 @@ public class EnergyFx extends EntityBreakingFX
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ ) if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
{ {
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ); 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), par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10,
(double) f7, (double) f9 ); f7, f9 );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 - par5 * f10 + par7 * f10), par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10,
(double) f7, (double) f8 ); f7, f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 + par5 * f10 + par7 * f10), par1Tessellator.addVertexWithUV( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10,
(double) f6, (double) f8 ); f6, f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10), par1Tessellator.addVertexWithUV( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10,
(double) f6, (double) f9 ); f6, f9 );
} }
} }
@@ -111,9 +111,9 @@ public class LightningFX extends EntityFX
{ {
clear(); clear();
double x = (this.prevPosX + (this.posX - this.prevPosX) * (double) l - interpPosX) - offX; double x = (this.prevPosX + (this.posX - this.prevPosX) * l - interpPosX) - offX;
double y = (this.prevPosY + (this.posY - this.prevPosY) * (double) l - interpPosY) - offY; double y = (this.prevPosY + (this.posY - this.prevPosY) * l - interpPosY) - offY;
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) l - interpPosZ) - offZ; double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * l - interpPosZ) - offZ;
for (int s = 0; s < steps; s++) for (int s = 0; s < steps; s++)
{ {
@@ -144,7 +144,7 @@ public class LightningFX extends EntityFX
oz = (xD * 0) - (1 * yD); 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; ox /= ss;
oy /= ss; oy /= ss;
oz /= ss; oz /= ss;
@@ -55,20 +55,20 @@ public class MatterCannonFX extends EntityBreakingFX
float f9 = this.particleTextureIndex.getMaxV(); float f9 = this.particleTextureIndex.getMaxV();
float f10 = 0.05F * this.particleScale; float f10 = 0.05F * this.particleScale;
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX); float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY); float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ); float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
float f14 = 1.0F; float f14 = 1.0F;
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha ); 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), par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10,
(double) f7, (double) f9 ); f7, f9 );
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 - par5 * f10 + par7 * f10), par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10,
(double) f7, (double) f8 ); f7, f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 + par5 * f10 + par7 * f10), par1Tessellator.addVertexWithUV( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10,
(double) f6, (double) f8 ); f6, f8 );
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10), par1Tessellator.addVertexWithUV( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10,
(double) f6, (double) f9 ); f6, f9 );
} }
} }
@@ -34,10 +34,10 @@ public class PaintBallRender implements IItemRenderer
if ( item.getItemDamage() >= 20 ) if ( item.getItemDamage() >= 20 )
par2Icon = ExtraItemTextures.ItemPaintBallShimmer.getIcon(); par2Icon = ExtraItemTextures.ItemPaintBallShimmer.getIcon();
float f4 = ((IIcon) par2Icon).getMinU(); float f4 = par2Icon.getMinU();
float f5 = ((IIcon) par2Icon).getMaxU(); float f5 = par2Icon.getMaxU();
float f6 = ((IIcon) par2Icon).getMinV(); float f6 = par2Icon.getMinV();
float f7 = ((IIcon) par2Icon).getMaxV(); float f7 = par2Icon.getMaxV();
float f12 = 0.0625F; float f12 = 0.0625F;
ItemPaintBall ipb = (ItemPaintBall) item.getItem(); ItemPaintBall ipb = (ItemPaintBall) item.getItem();
@@ -70,10 +70,10 @@ public class PaintBallRender implements IItemRenderer
tessellator.startDrawingQuads(); tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F ); tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 ); tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 ); tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 ); tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 ); tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw(); tessellator.draw();
} }
else else
@@ -82,7 +82,7 @@ public class PaintBallRender implements IItemRenderer
GL11.glTranslatef( 0.0F, 0.0F, 0.0F ); GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
else else
GL11.glTranslatef( -0.5F, -0.3F, 0.01F ); 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.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F ); GL11.glColor4f( 1, 1, 1, 1.0F );
@@ -34,10 +34,10 @@ public class ToolBiometricCardRender implements IItemRenderer
{ {
IIcon par2Icon = item.getIconIndex(); IIcon par2Icon = item.getIconIndex();
float f4 = ((IIcon) par2Icon).getMinU(); float f4 = par2Icon.getMinU();
float f5 = ((IIcon) par2Icon).getMaxU(); float f5 = par2Icon.getMaxU();
float f6 = ((IIcon) par2Icon).getMinV(); float f6 = par2Icon.getMinV();
float f7 = ((IIcon) par2Icon).getMaxV(); float f7 = par2Icon.getMaxV();
float f12 = 0.0625F; float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@@ -54,16 +54,16 @@ public class ToolBiometricCardRender implements IItemRenderer
tessellator.startDrawingQuads(); tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F ); tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 ); tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 ); tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 ); tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 ); tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw(); tessellator.draw();
} }
else else
{ {
GL11.glTranslatef( -0.5F, -0.3F, 0.01F ); 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.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F ); 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, tessellator.setColorOpaque_F( ((col.blackVariant >> 16) & 0xff) * scale, ((col.blackVariant >> 8) & 0xff) * scale,
(col.blackVariant & 0xff) * scale ); (col.blackVariant & 0xff) * scale );
tessellator.addVertexWithUV( x, y, z, (double) u, (double) v ); tessellator.addVertexWithUV( x, y, z, u, v );
tessellator.addVertexWithUV( x + 1, y, z, (double) u, (double) v ); tessellator.addVertexWithUV( x + 1, y, z, u, v );
tessellator.addVertexWithUV( x + 1, y + 1, z, (double) u, (double) v ); tessellator.addVertexWithUV( x + 1, y + 1, z, u, v );
tessellator.addVertexWithUV( x, y + 1, z, (double) u, (double) v ); tessellator.addVertexWithUV( x, y + 1, z, u, v );
} }
} }
tessellator.draw(); tessellator.draw();
@@ -32,10 +32,10 @@ public class ToolColorApplicatorRender implements IItemRenderer
{ {
IIcon par2Icon = item.getIconIndex(); IIcon par2Icon = item.getIconIndex();
float f4 = ((IIcon) par2Icon).getMinU(); float f4 = par2Icon.getMinU();
float f5 = ((IIcon) par2Icon).getMaxU(); float f5 = par2Icon.getMaxU();
float f6 = ((IIcon) par2Icon).getMinV(); float f6 = par2Icon.getMinV();
float f7 = ((IIcon) par2Icon).getMaxV(); float f7 = par2Icon.getMaxV();
float f12 = 0.0625F; float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
@@ -52,10 +52,10 @@ public class ToolColorApplicatorRender implements IItemRenderer
tessellator.startDrawingQuads(); tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F ); tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 ); tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 ); tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 ); tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 ); tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw(); tessellator.draw();
} }
else else
@@ -66,7 +66,7 @@ public class ToolColorApplicatorRender implements IItemRenderer
GL11.glTranslatef( 0.0F, 0.0F, 0.0F ); GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
else else
GL11.glTranslatef( -0.5F, -0.3F, 0.01F ); 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.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F ); GL11.glColor4f( 1, 1, 1, 1.0F );
@@ -92,38 +92,38 @@ public class ToolColorApplicatorRender implements IItemRenderer
{ {
tessellator.startDrawingQuads(); tessellator.startDrawingQuads();
f4 = ((IIcon) dark).getMinU(); f4 = dark.getMinU();
f5 = ((IIcon) dark).getMaxU(); f5 = dark.getMaxU();
f6 = ((IIcon) dark).getMinV(); f6 = dark.getMinV();
f7 = ((IIcon) dark).getMaxV(); f7 = dark.getMaxV();
tessellator.setColorOpaque_I( col.blackVariant ); tessellator.setColorOpaque_I( col.blackVariant );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 ); tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 ); tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 ); tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 ); tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
f4 = ((IIcon) light).getMinU(); f4 = light.getMinU();
f5 = ((IIcon) light).getMaxU(); f5 = light.getMaxU();
f6 = ((IIcon) light).getMinV(); f6 = light.getMinV();
f7 = ((IIcon) light).getMaxV(); f7 = light.getMaxV();
tessellator.setColorOpaque_I( col.whiteVariant ); tessellator.setColorOpaque_I( col.whiteVariant );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 ); tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 ); tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 ); tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 ); tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
f4 = ((IIcon) med).getMinU(); f4 = med.getMinU();
f5 = ((IIcon) med).getMaxU(); f5 = med.getMaxU();
f6 = ((IIcon) med).getMinV(); f6 = med.getMinV();
f7 = ((IIcon) med).getMaxV(); f7 = med.getMaxV();
tessellator.setColorOpaque_I( col.mediumVariant ); tessellator.setColorOpaque_I( col.mediumVariant );
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 ); tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 ); tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 ); tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 ); tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
tessellator.draw(); tessellator.draw();
} }
@@ -590,7 +590,7 @@ public abstract class AEBaseContainer extends Container
{ {
if ( syncData.containsKey( idx ) ) if ( syncData.containsKey( idx ) )
{ {
syncData.get( idx ).update( (long) value ); syncData.get( idx ).update( value );
return; return;
} }
@@ -118,15 +118,15 @@ public class SyncDat
if ( field.getType().equals( int.class ) ) if ( field.getType().equals( int.class ) )
field.set( source, (int) val ); field.set( source, (int) val );
else if ( field.getType().equals( long.class ) ) else if ( field.getType().equals( long.class ) )
field.set( source, (long) val ); field.set( source, val );
else if ( field.getType().equals( boolean.class ) ) else if ( field.getType().equals( boolean.class ) )
field.set( source, val == 1 ); field.set( source, val == 1 );
else if ( field.getType().equals( Integer.class ) ) else if ( field.getType().equals( Integer.class ) )
field.set( source, (Integer) (int) val ); field.set( source, (int) val );
else if ( field.getType().equals( Long.class ) ) else if ( field.getType().equals( Long.class ) )
field.set( source, (Long) val ); field.set( source, val );
else if ( field.getType().equals( Boolean.class ) ) else if ( field.getType().equals( Boolean.class ) )
field.set( source, (Boolean) (val == 1) ); field.set( source, val == 1 );
} }
source.onUpdate( field.getName(), oldValue, field.get( source ) ); source.onUpdate( field.getName(), oldValue, field.get( source ) );
@@ -262,7 +262,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
} }
this.copyMode = getCopyMode(); this.copyMode = getCopyMode();
this.fzMode = (FuzzyMode) getFuzzyMode(); this.fzMode = getFuzzyMode();
} }
prevStack = is; prevStack = is;
@@ -35,7 +35,7 @@ public class ContainerCondenser extends AEBaseContainer
double requiredEnergy = this.condenser.getRequiredPower(); double requiredEnergy = this.condenser.getRequiredPower();
int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage ); int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
this.requiredEnergy = (int) maxDisplay; this.requiredEnergy = maxDisplay;
this.storedPower = (int) this.condenser.storedPower; this.storedPower = (int) this.condenser.storedPower;
this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT ); this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
} }
@@ -5,7 +5,6 @@ import net.minecraft.item.ItemStack;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier; import appeng.api.config.PowerMultiplier;
import appeng.api.implementations.guiobjects.IPortableCell; import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.storage.ITerminalHost;
import appeng.util.Platform; import appeng.util.Platform;
public class ContainerMEPortableCell extends ContainerMEMonitorable public class ContainerMEPortableCell extends ContainerMEMonitorable
@@ -15,7 +14,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
IPortableCell civ; IPortableCell civ;
public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell monitorable) { public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell monitorable) {
super( ip, (ITerminalHost) monitorable, false ); super( ip, monitorable, false );
lockPlayerInventorySlot( ip.currentItem ); lockPlayerInventorySlot( ip.currentItem );
civ = monitorable; civ = monitorable;
bindPlayerInventory( ip, 0, 0 ); bindPlayerInventory( ip, 0, 0 );
@@ -50,7 +49,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
ticks++; ticks++;
if ( ticks > 10 ) if ( ticks > 10 )
{ {
civ.extractAEPower( powerMultiplier * (double) ticks, Actionable.MODULATE, PowerMultiplier.CONFIG ); civ.extractAEPower( powerMultiplier * ticks, Actionable.MODULATE, PowerMultiplier.CONFIG );
ticks = 0; ticks = 0;
} }
super.detectAndSendChanges(); super.detectAndSendChanges();
@@ -52,7 +52,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
if ( te instanceof IPart ) if ( te instanceof IPart )
{ {
IUpgradeableHost myTile = (IUpgradeableHost) te; IUpgradeableHost myTile = te;
TileEntity mk = myTile.getTile(); TileEntity mk = myTile.getTile();
w = mk.getWorldObj(); w = mk.getWorldObj();
xCoord = mk.xCoord; xCoord = mk.xCoord;
@@ -186,7 +186,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{ {
OptionalSlotFake fs = (OptionalSlotFake) o; OptionalSlotFake fs = (OptionalSlotFake) o;
if ( !fs.isEnabled() && fs.getDisplayStack() != null ) if ( !fs.isEnabled() && fs.getDisplayStack() != null )
((OptionalSlotFake) fs).clearStack(); fs.clearStack();
} }
} }
+2 -3
View File
@@ -77,7 +77,6 @@ import appeng.block.storage.BlockDrive;
import appeng.block.storage.BlockIOPort; import appeng.block.storage.BlockIOPort;
import appeng.block.storage.BlockSkyChest; import appeng.block.storage.BlockSkyChest;
import appeng.core.features.AEFeature; import appeng.core.features.AEFeature;
import appeng.core.features.AEFeatureHandler;
import appeng.core.features.ColoredItemDefinition; import appeng.core.features.ColoredItemDefinition;
import appeng.core.features.DamagedItemDefinition; import appeng.core.features.DamagedItemDefinition;
import appeng.core.features.IAEFeature; import appeng.core.features.IAEFeature;
@@ -228,7 +227,7 @@ public class Registration
Parts parts = appeng.core.Api.instance.parts(); Parts parts = appeng.core.Api.instance.parts();
Blocks blocks = appeng.core.Api.instance.blocks(); Blocks blocks = appeng.core.Api.instance.blocks();
AEItemDefinition materialItem = (AEFeatureHandler) addFeature( ItemMultiMaterial.class ); AEItemDefinition materialItem = addFeature( ItemMultiMaterial.class );
Class materialClass = materials.getClass(); Class materialClass = materials.getClass();
for (MaterialType mat : MaterialType.values()) for (MaterialType mat : MaterialType.values())
@@ -254,7 +253,7 @@ public class Registration
} }
} }
AEItemDefinition partItem = (AEFeatureHandler) addFeature( ItemMultiPart.class ); AEItemDefinition partItem = addFeature( ItemMultiPart.class );
Class partClass = parts.getClass(); Class partClass = parts.getClass();
for (PartType type : PartType.values()) for (PartType type : PartType.values())
@@ -22,7 +22,7 @@ public class ExternalIInv implements IExternalStorageHandler
@Override @Override
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src) public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src)
{ {
InventoryAdaptor ad = InventoryAdaptor.getAdaptor( (IInventory) te, d ); InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, d );
if ( channel == StorageChannel.ITEMS && ad != null ) if ( channel == StorageChannel.ITEMS && ad != null )
return new MEMonitorIInventory( ad ); return new MEMonitorIInventory( ad );
@@ -23,7 +23,7 @@ public final class AppEngServerPacketHandler extends AppEngPacketHandlerBase imp
{ {
packetType = stream.readInt(); packetType = stream.readInt();
AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream ); AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
pack.serverPacketData( manager, pack, (EntityPlayer) player ); pack.serverPacketData( manager, pack, player );
} }
catch (InstantiationException e) catch (InstantiationException e)
{ {
@@ -49,7 +49,7 @@ public class PacketCompressedNBT extends AppEngPacket
if ( stream.readableBytes() <= 0 ) if ( stream.readableBytes() <= 0 )
return -1; return -1;
return (int) stream.readByte() & 0xff; return stream.readByte() & 0xff;
} }
} ); } );
@@ -6,7 +6,6 @@ import io.netty.buffer.Unpooled;
import java.io.IOException; import java.io.IOException;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import appeng.client.ClientHelper; import appeng.client.ClientHelper;
import appeng.client.render.effects.LightningFX; import appeng.client.render.effects.LightningFX;
@@ -40,7 +39,7 @@ public class PacketLightning extends AppEngPacket
if ( Platform.isClient() && AEConfig.instance.enableEffects ) if ( Platform.isClient() && AEConfig.instance.enableEffects )
{ {
LightningFX fx = new LightningFX( ClientHelper.proxy.getWorld(), x, y, z, 0.0f, 0.0f, 0.0f ); LightningFX fx = new LightningFX( ClientHelper.proxy.getWorld(), x, y, z, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
catch (Exception err) catch (Exception err)
@@ -60,7 +60,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket
if ( stream.readableBytes() <= 0 ) if ( stream.readableBytes() <= 0 )
return -1; return -1;
return (int) stream.readByte() & 0xff; return stream.readByte() & 0xff;
} }
} ); } );
@@ -6,7 +6,6 @@ import io.netty.buffer.Unpooled;
import java.io.IOException; import java.io.IOException;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -51,7 +50,7 @@ public class PacketMatterCannon extends AppEngPacket
{ {
MatterCannonFX fx = new MatterCannonFX( world, x + dx * a, y + dy * a, z + dz * a, Items.diamond ); MatterCannonFX fx = new MatterCannonFX( world, x + dx * a, y + dy * a, z + dz * a, Items.diamond );
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
catch (Exception err) catch (Exception err)
@@ -8,7 +8,6 @@ import java.io.IOException;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@@ -61,7 +60,7 @@ public class PacketTransitionEffect extends AppEngPacket
fx.motionY = -0.1 * d.offsetY; fx.motionY = -0.1 * d.offsetY;
fx.motionZ = -0.1 * d.offsetZ; fx.motionZ = -0.1 * d.offsetZ;
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
if ( mode ) if ( mode )
@@ -39,10 +39,10 @@ public class ToolDebugCard extends AEBaseItem
public String timeMeasurement(long nanos) public String timeMeasurement(long nanos)
{ {
long ms = (long) (nanos / 100000); long ms = nanos / 100000;
if ( nanos <= 100000 ) if ( nanos <= 100000 )
return nanos + "ns"; return nanos + "ns";
return (((float) ms) / 10.0f) + "ms"; return ((ms) / 10.0f) + "ms";
} }
@Override @Override
@@ -168,7 +168,7 @@ public class ToolDebugCard extends AEBaseItem
if ( te instanceof IGridHost ) if ( te instanceof IGridHost )
{ {
IGridNode node = (IGridNode) ((IGridHost) te).getGridNode( ForgeDirection.getOrientation( side ) ); IGridNode node = ((IGridHost) te).getGridNode( ForgeDirection.getOrientation( side ) );
if ( node != null && node.getGrid() != null ) if ( node != null && node.getGrid() != null )
{ {
IEnergyGrid eg = node.getGrid().getCache( IEnergyGrid.class ); IEnergyGrid eg = node.getGrid().getCache( IEnergyGrid.class );
@@ -23,7 +23,7 @@ final public class EntityGrowingCrystal extends EntityItem
public float getProgress() public float getProgress()
{ {
return (float) progress_1000 / 1000.0f; return progress_1000 / 1000.0f;
} }
public EntityGrowingCrystal(World w) { public EntityGrowingCrystal(World w) {
@@ -30,9 +30,9 @@ public class RenderTinyTNTPrimed extends Render
GL11.glTranslatef( (float) x, (float) y - 0.25f, (float) z ); GL11.glTranslatef( (float) x, (float) y - 0.25f, (float) z );
float f2; float f2;
if ( (float) tnt.fuse - life + 1.0F < 10.0F ) if ( tnt.fuse - life + 1.0F < 10.0F )
{ {
f2 = 1.0F - ((float) tnt.fuse - life + 1.0F) / 10.0F; f2 = 1.0F - (tnt.fuse - life + 1.0F) / 10.0F;
if ( f2 < 0.0F ) if ( f2 < 0.0F )
{ {
@@ -51,7 +51,7 @@ public class RenderTinyTNTPrimed extends Render
} }
GL11.glScalef( 0.5f, 0.5f, 0.5f ); GL11.glScalef( 0.5f, 0.5f, 0.5f );
f2 = (1.0F - ((float) tnt.fuse - life + 1.0F) / 100.0F) * 0.8F; f2 = (1.0F - (tnt.fuse - life + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture( tnt ); this.bindEntityTexture( tnt );
this.blockRenderer.renderBlockAsItem( Blocks.tnt, 0, tnt.getBrightness( life ) ); this.blockRenderer.renderBlockAsItem( Blocks.tnt, 0, tnt.getBrightness( life ) );
@@ -1010,7 +1010,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
EnumSet<ForgeDirection> possibleDirections = iHost.getTargets(); EnumSet<ForgeDirection> possibleDirections = iHost.getTargets();
for (ForgeDirection s : possibleDirections) for (ForgeDirection s : possibleDirections)
{ {
Vec3 from = Vec3.createVectorHelper( (double) tile.xCoord + 0.5, (double) tile.yCoord + 0.5, (double) tile.zCoord + 0.5 ); Vec3 from = Vec3.createVectorHelper( tile.xCoord + 0.5, tile.yCoord + 0.5, tile.zCoord + 0.5 );
from = from.addVector( s.offsetX * 0.501, s.offsetY * 0.501, s.offsetZ * 0.501 ); from = from.addVector( s.offsetX * 0.501, s.offsetY * 0.501, s.offsetZ * 0.501 );
Vec3 to = from.addVector( s.offsetX, s.offsetY, s.offsetZ ); Vec3 to = from.addVector( s.offsetX, s.offsetY, s.offsetZ );
+2 -2
View File
@@ -63,12 +63,12 @@ public class Splotch
public float x() public float x()
{ {
return (float) (pos & 0x0f) / 15.0f; return (pos & 0x0f) / 15.0f;
} }
public float y() public float y()
{ {
return (float) ((pos >> 4) & 0x0f) / 15.0f; return ((pos >> 4) & 0x0f) / 15.0f;
} }
public int getSeed() public int getSeed()
@@ -126,9 +126,9 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost
if ( dc.getWorld() == myPlayer.worldObj ) if ( dc.getWorld() == myPlayer.worldObj )
{ {
double offX = (double) dc.x - myPlayer.posX; double offX = dc.x - myPlayer.posX;
double offY = (double) dc.y - myPlayer.posY; double offY = dc.y - myPlayer.posY;
double offZ = (double) dc.z - myPlayer.posZ; double offZ = dc.z - myPlayer.posZ;
double r = offX * offX + offY * offY + offZ * offZ; double r = offX * offX + offY * offY + offZ * offZ;
if ( r < rangeLimit && sqRange > r ) if ( r < rangeLimit && sqRange > r )
@@ -20,8 +20,8 @@ final public class DispenserBehaviorTinyTNT extends BehaviorDefaultDispenseItem
int i = dispenser.getXInt() + enumfacing.getFrontOffsetX(); int i = dispenser.getXInt() + enumfacing.getFrontOffsetX();
int j = dispenser.getYInt() + enumfacing.getFrontOffsetY(); int j = dispenser.getYInt() + enumfacing.getFrontOffsetY();
int k = dispenser.getZInt() + enumfacing.getFrontOffsetZ(); int k = dispenser.getZInt() + enumfacing.getFrontOffsetZ();
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( world, i + 0.5F, j + 0.5F,
(double) ((float) k + 0.5F), (EntityLiving) null ); k + 0.5F, (EntityLiving) null );
world.spawnEntityInWorld( primedTinyTNTEntity ); world.spawnEntityInWorld( primedTinyTNTEntity );
--dispensedItem.stackSize; --dispensedItem.stackSize;
return dispensedItem; return dispensedItem;
@@ -66,7 +66,7 @@ public class NEICraftingHandler implements IOverlayHandler
{ {
if ( slot instanceof SlotCraftingMatrix || slot instanceof SlotFakeCraftingMatrix ) if ( slot instanceof SlotCraftingMatrix || slot instanceof SlotFakeCraftingMatrix )
{ {
Slot ctSlot = (Slot) slot; Slot ctSlot = slot;
if ( ctSlot.getSlotIndex() == col + row * 3 ) if ( ctSlot.getSlotIndex() == col + row * 3 )
{ {
NBTTagList tags = new NBTTagList(); NBTTagList tags = new NBTTagList();
@@ -63,7 +63,7 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
{ {
NBTTagCompound comp = Platform.openNbtData( is ); NBTTagCompound comp = Platform.openNbtData( is );
comp.setInteger( "progress", newDamage ); comp.setInteger( "progress", newDamage );
is.setItemDamage( (int) (is.getItemDamage() / LEVEL_OFFSET) * LEVEL_OFFSET ); is.setItemDamage( is.getItemDamage() / LEVEL_OFFSET * LEVEL_OFFSET );
} }
public ItemCrystalSeed() { public ItemCrystalSeed() {
@@ -261,7 +261,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
{ {
if ( result.getItem() instanceof ItemBlock ) if ( result.getItem() instanceof ItemBlock )
{ {
if ( Block.getBlockFromItem( (ItemBlock) result.getItem() ) == Blk && result.getItem().getDamage( result ) == Metadata ) if ( Block.getBlockFromItem( result.getItem() ) == Blk && result.getItem().getDamage( result ) == Metadata )
{ {
canFurnaceable = false; canFurnaceable = false;
} }
@@ -280,7 +280,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
{ {
extractAEPower( item, 1600 ); extractAEPower( item, 1600 );
InWorldToolOperationResult or = InWorldToolOperationResult.getBlockOperationResult( out.toArray( new ItemStack[out.size()] ) ); InWorldToolOperationResult or = InWorldToolOperationResult.getBlockOperationResult( out.toArray( new ItemStack[out.size()] ) );
w.playSoundEffect( (double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F ); w.playSoundEffect( x + 0.5D, y + 0.5D, z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
if ( or.BlockItem == null ) if ( or.BlockItem == null )
{ {
@@ -311,7 +311,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
if ( w.isAirBlock( x, y, z ) ) if ( w.isAirBlock( x, y, z ) )
{ {
extractAEPower( item, 1600 ); extractAEPower( item, 1600 );
w.playSoundEffect( (double) x + 0.5D, (double) y + 0.5D, (double) z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F ); w.playSoundEffect( x + 0.5D, y + 0.5D, z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
w.setBlock( x, y, z, Blocks.fire ); w.setBlock( x, y, z, Blocks.fire );
} }
@@ -128,9 +128,9 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
float f = 1.0F; float f = 1.0F;
float f1 = p.prevRotationPitch + (p.rotationPitch - p.prevRotationPitch) * f; float f1 = p.prevRotationPitch + (p.rotationPitch - p.prevRotationPitch) * f;
float f2 = p.prevRotationYaw + (p.rotationYaw - p.prevRotationYaw) * f; float f2 = p.prevRotationYaw + (p.rotationYaw - p.prevRotationYaw) * f;
double d0 = p.prevPosX + (p.posX - p.prevPosX) * (double) f; double d0 = p.prevPosX + (p.posX - p.prevPosX) * f;
double d1 = p.prevPosY + (p.posY - p.prevPosY) * (double) f + 1.62D - (double) p.yOffset; double d1 = p.prevPosY + (p.posY - p.prevPosY) * f + 1.62D - p.yOffset;
double d2 = p.prevPosZ + (p.posZ - p.prevPosZ) * (double) f; double d2 = p.prevPosZ + (p.posZ - p.prevPosZ) * f;
Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 ); Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 );
float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI ); float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI );
float f4 = MathHelper.sin( -f2 * 0.017453292F - (float) Math.PI ); float f4 = MathHelper.sin( -f2 * 0.017453292F - (float) Math.PI );
@@ -140,8 +140,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
float f8 = f3 * f5; float f8 = f3 * f5;
double d3 = 32.0D; double d3 = 32.0D;
Vec3 vec31 = vec3.addVector( (double) f7 * d3, (double) f6 * d3, (double) f8 * d3 ); Vec3 vec31 = vec3.addVector( f7 * d3, f6 * d3, f8 * d3 );
Vec3 direction = Vec3.createVectorHelper( (double) f7 * d3, (double) f6 * d3, (double) f8 * d3 ); Vec3 direction = Vec3.createVectorHelper( f7 * d3, f6 * d3, f8 * d3 );
direction.normalize(); direction.normalize();
float penetration = AEApi.instance().registries().matterCannon().getPenetration( ammo ); // 196.96655f; float penetration = AEApi.instance().registries().matterCannon().getPenetration( ammo ); // 196.96655f;
@@ -196,7 +196,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue; continue;
float f1 = 0.3F; float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 ); AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( f1, f1, f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 ); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null ) if ( movingobjectposition1 != null )
@@ -255,7 +255,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
sh.setFleeceColor( col.ordinal() ); sh.setFleeceColor( col.ordinal() );
} }
pos.entityHit.attackEntityFrom( DamageSource.causePlayerDamage( p ), (float) 0 ); pos.entityHit.attackEntityFrom( DamageSource.causePlayerDamage( p ), 0 );
NetworkHandler.instance.sendToAll( marker.getPacket() ); NetworkHandler.instance.sendToAll( marker.getPacket() );
} }
else if ( pos.typeOfHit == MovingObjectType.BLOCK ) else if ( pos.typeOfHit == MovingObjectType.BLOCK )
@@ -321,7 +321,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue; continue;
float f1 = 0.3F; float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 ); AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( f1, f1, f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 ); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null ) if ( movingobjectposition1 != null )
@@ -372,7 +372,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
{ {
EntityLivingBase el = (EntityLivingBase) pos.entityHit; EntityLivingBase el = (EntityLivingBase) pos.entityHit;
penetration -= dmg; penetration -= dmg;
el.knockBack( p, 0, (double) -direction.xCoord, (double) -direction.zCoord ); el.knockBack( p, 0, -direction.xCoord, -direction.zCoord );
// el.knockBack( p, 0, vec3.xCoord, // el.knockBack( p, 0, vec3.xCoord,
// vec3.zCoord ); // vec3.zCoord );
el.attackEntityFrom( dmgSrc, dmg ); el.attackEntityFrom( dmgSrc, dmg );
+1 -1
View File
@@ -95,7 +95,7 @@ public class GridConnection implements IGridConnection, IPathItem
private boolean isNetworkABetter(GridNode a, GridNode b) private boolean isNetworkABetter(GridNode a, GridNode b)
{ {
return ((Grid) a.myGrid).isImportant > ((Grid) b.myGrid).isImportant || a.myGrid.size() > b.myGrid.size(); return a.myGrid.isImportant > b.myGrid.isImportant || a.myGrid.size() > b.myGrid.size();
} }
@Override @Override
+1 -1
View File
@@ -277,7 +277,7 @@ public class GridNode implements IGridNode, IPathItem
if ( con != null ) if ( con != null )
{ {
IGridNode os = (IGridNode) con.getOtherSide( this ); IGridNode os = con.getOtherSide( this );
if ( os == node ) if ( os == node )
{ {
// if this connection is no longer valid, destroy it. // if this connection is no longer valid, destroy it.
+2 -2
View File
@@ -233,7 +233,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
if ( machine instanceof ICraftingWatcherHost ) if ( machine instanceof ICraftingWatcherHost )
{ {
ICraftingWatcherHost swh = (ICraftingWatcherHost) machine; ICraftingWatcherHost swh = (ICraftingWatcherHost) machine;
CraftingWatcher iw = new CraftingWatcher( this, (ICraftingWatcherHost) swh ); CraftingWatcher iw = new CraftingWatcher( this, swh );
watchers.put( gridNode, iw ); watchers.put( gridNode, iw );
swh.updateWatcher( iw ); swh.updateWatcher( iw );
} }
@@ -420,7 +420,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
public boolean canAccept(IAEStack input) public boolean canAccept(IAEStack input)
{ {
for (CraftingCPUCluster cpu : cpuClusters) for (CraftingCPUCluster cpu : cpuClusters)
if ( cpu.canAccept( (IAEItemStack) input ) ) if ( cpu.canAccept( input ) )
return true; return true;
return false; return false;
+1 -1
View File
@@ -305,7 +305,7 @@ public class EnergyGridCache implements IEnergyGrid
if ( machine instanceof IEnergyWatcherHost ) if ( machine instanceof IEnergyWatcherHost )
{ {
IEnergyWatcherHost swh = (IEnergyWatcherHost) machine; IEnergyWatcherHost swh = (IEnergyWatcherHost) machine;
EnergyWatcher iw = new EnergyWatcher( this, (IEnergyWatcherHost) swh ); EnergyWatcher iw = new EnergyWatcher( this, swh );
watchers.put( node, iw ); watchers.put( node, iw );
swh.updateWatcher( iw ); swh.updateWatcher( iw );
} }
+3 -3
View File
@@ -249,7 +249,7 @@ public class GridStorageCache implements IStorageGrid
if ( machine instanceof IStackWatcherHost ) if ( machine instanceof IStackWatcherHost )
{ {
IStackWatcherHost swh = (IStackWatcherHost) machine; IStackWatcherHost swh = (IStackWatcherHost) machine;
ItemWatcher iw = new ItemWatcher( this, (IStackWatcherHost) swh ); ItemWatcher iw = new ItemWatcher( this, swh );
watchers.put( node, iw ); watchers.put( node, iw );
swh.updateWatcher( iw ); swh.updateWatcher( iw );
} }
@@ -286,10 +286,10 @@ public class GridStorageCache implements IStorageGrid
switch (chan) switch (chan)
{ {
case FLUIDS: case FLUIDS:
fluidMonitor.postChange( up_or_down > 0, (IItemList<IAEFluidStack>) availableItems, src ); fluidMonitor.postChange( up_or_down > 0, availableItems, src );
break; break;
case ITEMS: case ITEMS:
itemMonitor.postChange( up_or_down > 0, (IItemList<IAEItemStack>) availableItems, src ); itemMonitor.postChange( up_or_down > 0, availableItems, src );
break; break;
default: default:
} }
+3 -3
View File
@@ -94,7 +94,7 @@ public class PathGridCache implements IPathingGrid
int nodes = myGrid.getNodes().size(); int nodes = myGrid.getNodes().size();
ticksUntilReady = 20 + Math.max( 0, nodes / 100 - 20 ); ticksUntilReady = 20 + Math.max( 0, nodes / 100 - 20 );
channelsByBlocks = nodes * used; channelsByBlocks = nodes * used;
channelPowerUsage = (double) channelsByBlocks / 128.0; channelPowerUsage = channelsByBlocks / 128.0;
myGrid.getPivot().beginVisit( new AdHocChannelUpdater( used ) ); myGrid.getPivot().beginVisit( new AdHocChannelUpdater( used ) );
} }
@@ -110,7 +110,7 @@ public class PathGridCache implements IPathingGrid
ticksUntilReady = 20 + Math.max( 0, nodes / 100 - 20 ); ticksUntilReady = 20 + Math.max( 0, nodes / 100 - 20 );
channelsByBlocks = nodes * used; channelsByBlocks = nodes * used;
channelPowerUsage = (double) channelsByBlocks / 128.0; channelPowerUsage = channelsByBlocks / 128.0;
myGrid.getPivot().beginVisit( new AdHocChannelUpdater( used ) ); myGrid.getPivot().beginVisit( new AdHocChannelUpdater( used ) );
} }
@@ -177,7 +177,7 @@ public class PathGridCache implements IPathingGrid
achievementPost(); achievementPost();
booting = false; booting = false;
channelPowerUsage = (double) channelsByBlocks / 128.0; channelPowerUsage = channelsByBlocks / 128.0;
myGrid.postEvent( new MENetworkBootingStatusChange() ); myGrid.postEvent( new MENetworkBootingStatusChange() );
} }
} }
+1 -1
View File
@@ -101,7 +101,7 @@ public class SecurityCache implements IGridCache, ISecurityGrid
{ {
if ( machine instanceof ISecurityProvider ) if ( machine instanceof ISecurityProvider )
{ {
securityProvider.remove( (ISecurityProvider) machine ); securityProvider.remove( machine );
updateSecurityKey(); updateSecurityKey();
} }
} }
@@ -313,7 +313,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
if ( finalOutput.equals( what ) ) if ( finalOutput.equals( what ) )
{ {
if ( myLastLink != null ) if ( myLastLink != null )
return ((CraftingLink) myLastLink).injectItems( (IAEItemStack) what.copy(), type ); return ((CraftingLink) myLastLink).injectItems( what.copy(), type );
return what; // ignore it. return what; // ignore it.
} }
@@ -331,7 +331,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
{ {
if ( myLastLink != null ) if ( myLastLink != null )
{ {
leftOver.add( ((CraftingLink) myLastLink).injectItems( (IAEItemStack) used.copy(), type ) ); leftOver.add( ((CraftingLink) myLastLink).injectItems( used.copy(), type ) );
return leftOver; return leftOver;
} }
@@ -391,7 +391,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
if ( myLastLink != null ) if ( myLastLink != null )
{ {
what.add( ((CraftingLink) myLastLink).injectItems( (IAEItemStack) insert.copy(), type ) ); what.add( ((CraftingLink) myLastLink).injectItems( insert.copy(), type ) );
return what; return what;
} }
@@ -61,7 +61,7 @@ public class QuantumCalculator extends MBCalculator
num++; num++;
if ( num == 5 ) if ( num == 5 )
{ {
flags = (byte) (num); flags = (num);
c.setCenter( te ); c.setCenter( te );
} }
else else
@@ -69,7 +69,7 @@ public class QuantumCalculator extends MBCalculator
if ( num == 1 || num == 3 || num == 7 || num == 9 ) if ( num == 1 || num == 3 || num == 7 || num == 9 )
flags = (byte) (tqb.corner | num); flags = (byte) (tqb.corner | num);
else else
flags = (byte) (num); flags = (num);
c.Ring[ringNum++] = te; c.Ring[ringNum++] = te;
} }
@@ -133,7 +133,7 @@ public class QuantumCluster implements ILocatable, IAECluster
if ( myOtherSide instanceof QuantumCluster ) if ( myOtherSide instanceof QuantumCluster )
{ {
QuantumCluster sideA = (QuantumCluster) this; QuantumCluster sideA = this;
QuantumCluster sideB = (QuantumCluster) myOtherSide; QuantumCluster sideB = (QuantumCluster) myOtherSide;
if ( sideA.isActive() && sideB.isActive() ) if ( sideA.isActive() && sideB.isActive() )
@@ -22,7 +22,7 @@ public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
public IAEFluidStack injectItems(IAEFluidStack input, Actionable mode, BaseActionSource src) public IAEFluidStack injectItems(IAEFluidStack input, Actionable mode, BaseActionSource src)
{ {
if ( input != null ) if ( input != null )
target.addPower( (double) input.getStackSize() / 1000.0 ); target.addPower( input.getStackSize() / 1000.0 );
return null; return null;
} }
@@ -251,7 +251,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
{ {
try try
{ {
new GridConnection( (IGridNode) cn, (IGridNode) sn, ForgeDirection.UNKNOWN ); new GridConnection( cn, sn, ForgeDirection.UNKNOWN );
} }
catch (FailedConnection e) catch (FailedConnection e)
{ {
@@ -296,7 +296,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
{ {
try try
{ {
new GridConnection( (IGridNode) cn, (IGridNode) sn, ForgeDirection.UNKNOWN ); new GridConnection( cn, sn, ForgeDirection.UNKNOWN );
} }
catch (FailedConnection e) catch (FailedConnection e)
{ {
@@ -64,7 +64,7 @@ public class PartPlacement
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
float f = 1.0F; float f = 1.0F;
double d0 = (double) mc.playerController.getBlockReachDistance(); double d0 = mc.playerController.getBlockReachDistance();
Vec3 vec3 = mc.renderViewEntity.getPosition( f ); Vec3 vec3 = mc.renderViewEntity.getPosition( f );
if ( mop != null && mop.hitVec.distanceTo( vec3 ) < d0 ) if ( mop != null && mop.hitVec.distanceTo( vec3 ) < d0 )
@@ -247,8 +247,8 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
Block blk = w.getBlock( x, y, z ); Block blk = w.getBlock( x, y, z );
IStorageGrid storage = (IStorageGrid) proxy.getStorage(); IStorageGrid storage = proxy.getStorage();
IEnergyGrid energy = (IEnergyGrid) proxy.getEnergy(); IEnergyGrid energy = proxy.getEnergy();
Material mat = blk.getMaterial(); Material mat = blk.getMaterial();
boolean ignore = mat == Material.air || mat == Material.lava || mat == Material.water || mat.isLiquid() || blk == Blocks.bedrock boolean ignore = mat == Material.air || mat == Material.lava || mat == Material.water || mat.isLiquid() || blk == Blocks.bedrock
@@ -430,8 +430,8 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
{ {
try try
{ {
IStorageGrid storage = (IStorageGrid) proxy.getStorage(); IStorageGrid storage = proxy.getStorage();
IEnergyGrid energy = (IEnergyGrid) proxy.getEnergy(); IEnergyGrid energy = proxy.getEnergy();
while (!Buffer.isEmpty()) while (!Buffer.isEmpty())
{ {
@@ -463,9 +463,9 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
is.stackSize = (int) maxStorage; is.stackSize = (int) maxStorage;
EntityItem ei = new EntityItem( w, // w EntityItem ei = new EntityItem( w, // w
((side.offsetX != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetX * -0.3 + (double) x, // spawn ((side.offsetX != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetX * -0.3 + x, // spawn
((side.offsetY != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetY * -0.3 + (double) y, // spawn ((side.offsetY != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetY * -0.3 + y, // spawn
((side.offsetZ != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetZ * -0.3 + (double) z, // spawn ((side.offsetZ != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetZ * -0.3 + z, // spawn
is.copy() ); is.copy() );
Entity result = ei; Entity result = ei;
@@ -428,9 +428,9 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
{ {
ForgeDirection d = side; ForgeDirection d = side;
double d0 = (double) ((float) d.offsetX * 0.45F) + (double) (r.nextFloat() - 0.5F) * 0.2D; double d0 = d.offsetX * 0.45F + (r.nextFloat() - 0.5F) * 0.2D;
double d1 = (double) ((float) d.offsetY * 0.45F) + (double) (r.nextFloat() - 0.5F) * 0.2D; double d1 = d.offsetY * 0.45F + (r.nextFloat() - 0.5F) * 0.2D;
double d2 = (double) ((float) d.offsetZ * 0.45F) + (double) (r.nextFloat() - 0.5F) * 0.2D; double d2 = d.offsetZ * 0.45F + (r.nextFloat() - 0.5F) * 0.2D;
world.spawnParticle( "reddust", 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D ); world.spawnParticle( "reddust", 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
} }
@@ -469,20 +469,20 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
* float var16 = (float)var14 / 256.0F; float var17 = ((float)var14 + 15.99F) / 256.0F; float var18 = * float var16 = (float)var14 / 256.0F; float var17 = ((float)var14 + 15.99F) / 256.0F; float var18 =
* (float)var15 / 256.0F; float var19 = ((float)var15 + 15.99F) / 256.0F; * (float)var15 / 256.0F; float var19 = ((float)var15 + 15.99F) / 256.0F;
*/ */
double var20b = (double) offTexture.getInterpolatedU( 7.0D ); double var20b = offTexture.getInterpolatedU( 7.0D );
double var24b = (double) offTexture.getInterpolatedU( 9.0D ); double var24b = offTexture.getInterpolatedU( 9.0D );
double var20 = (double) IIcon.getInterpolatedU( 7.0D ); double var20 = IIcon.getInterpolatedU( 7.0D );
double var24 = (double) IIcon.getInterpolatedU( 9.0D ); double var24 = IIcon.getInterpolatedU( 9.0D );
double var22 = (double) IIcon.getInterpolatedV( 6.0D + (isOn ? 0 : 1.0D) ); double var22 = IIcon.getInterpolatedV( 6.0D + (isOn ? 0 : 1.0D) );
double var26 = (double) IIcon.getInterpolatedV( 8.0D + (isOn ? 0 : 1.0D) ); double var26 = IIcon.getInterpolatedV( 8.0D + (isOn ? 0 : 1.0D) );
double var28 = (double) IIcon.getInterpolatedU( 7.0D ); double var28 = IIcon.getInterpolatedU( 7.0D );
double var30 = (double) IIcon.getInterpolatedV( 13.0D ); double var30 = IIcon.getInterpolatedV( 13.0D );
double var32 = (double) IIcon.getInterpolatedU( 9.0D ); double var32 = IIcon.getInterpolatedU( 9.0D );
double var34 = (double) IIcon.getInterpolatedV( 15.0D ); double var34 = IIcon.getInterpolatedV( 15.0D );
double var22b = (double) IIcon.getInterpolatedV( 9.0D ); double var22b = IIcon.getInterpolatedV( 9.0D );
double var26b = (double) IIcon.getInterpolatedV( 11.0D ); double var26b = IIcon.getInterpolatedV( 11.0D );
baseX += 0.5D; baseX += 0.5D;
baseZ += 0.5D; baseZ += 0.5D;
@@ -523,25 +523,25 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
this.addVertexWithUV( baseX - var44 + Zero, baseY, baseZ + var44 + par10, var28, var34 ); this.addVertexWithUV( baseX - var44 + Zero, baseY, baseZ + var44 + par10, var28, var34 );
this.addVertexWithUV( baseX - var44 + Zero, baseY, baseZ - var44 + par10, var28, var30 ); this.addVertexWithUV( baseX - var44 + Zero, baseY, baseZ - var44 + par10, var28, var30 );
this.addVertexWithUV( baseX - var44, baseY + 1.0D, var40, (double) var16, (double) var18 ); this.addVertexWithUV( baseX - var44, baseY + 1.0D, var40, var16, var18 );
this.addVertexWithUV( baseX - var44 + Zero, baseY + 0.0D, var40 + par10, (double) var16, (double) var19 ); this.addVertexWithUV( baseX - var44 + Zero, baseY + 0.0D, var40 + par10, var16, var19 );
this.addVertexWithUV( baseX - var44 + Zero, baseY + 0.0D, var42 + par10, (double) var17, (double) var19 ); this.addVertexWithUV( baseX - var44 + Zero, baseY + 0.0D, var42 + par10, var17, var19 );
this.addVertexWithUV( baseX - var44, baseY + 1.0D, var42, (double) var17, (double) var18 ); this.addVertexWithUV( baseX - var44, baseY + 1.0D, var42, var17, var18 );
this.addVertexWithUV( baseX + var44, baseY + 1.0D, var42, (double) var16, (double) var18 ); this.addVertexWithUV( baseX + var44, baseY + 1.0D, var42, var16, var18 );
this.addVertexWithUV( baseX + Zero + var44, baseY + 0.0D, var42 + par10, (double) var16, (double) var19 ); this.addVertexWithUV( baseX + Zero + var44, baseY + 0.0D, var42 + par10, var16, var19 );
this.addVertexWithUV( baseX + Zero + var44, baseY + 0.0D, var40 + par10, (double) var17, (double) var19 ); this.addVertexWithUV( baseX + Zero + var44, baseY + 0.0D, var40 + par10, var17, var19 );
this.addVertexWithUV( baseX + var44, baseY + 1.0D, var40, (double) var17, (double) var18 ); this.addVertexWithUV( baseX + var44, baseY + 1.0D, var40, var17, var18 );
this.addVertexWithUV( var36, baseY + 1.0D, baseZ + var44, (double) var16, (double) var18 ); this.addVertexWithUV( var36, baseY + 1.0D, baseZ + var44, var16, var18 );
this.addVertexWithUV( var36 + Zero, baseY + 0.0D, baseZ + var44 + par10, (double) var16, (double) var19 ); this.addVertexWithUV( var36 + Zero, baseY + 0.0D, baseZ + var44 + par10, var16, var19 );
this.addVertexWithUV( var38 + Zero, baseY + 0.0D, baseZ + var44 + par10, (double) var17, (double) var19 ); this.addVertexWithUV( var38 + Zero, baseY + 0.0D, baseZ + var44 + par10, var17, var19 );
this.addVertexWithUV( var38, baseY + 1.0D, baseZ + var44, (double) var17, (double) var18 ); this.addVertexWithUV( var38, baseY + 1.0D, baseZ + var44, var17, var18 );
this.addVertexWithUV( var38, baseY + 1.0D, baseZ - var44, (double) var16, (double) var18 ); this.addVertexWithUV( var38, baseY + 1.0D, baseZ - var44, var16, var18 );
this.addVertexWithUV( var38 + Zero, baseY + 0.0D, baseZ - var44 + par10, (double) var16, (double) var19 ); this.addVertexWithUV( var38 + Zero, baseY + 0.0D, baseZ - var44 + par10, var16, var19 );
this.addVertexWithUV( var36 + Zero, baseY + 0.0D, baseZ - var44 + par10, (double) var17, (double) var19 ); this.addVertexWithUV( var36 + Zero, baseY + 0.0D, baseZ - var44 + par10, var17, var19 );
this.addVertexWithUV( var36, baseY + 1.0D, baseZ - var44, (double) var17, (double) var18 ); this.addVertexWithUV( var36, baseY + 1.0D, baseZ - var44, var17, var18 );
} }
boolean status = false; boolean status = false;
@@ -173,7 +173,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
@Override @Override
public TileEntity getTileEntity() public TileEntity getTileEntity()
{ {
return (TileEntity) super.getHost().getTile(); return super.getHost().getTile();
} }
@Override @Override
@@ -206,7 +206,7 @@ public class PartP2PBCPower extends PartP2PTunnel<PartP2PBCPower> implements IPo
public PowerReceiver getPowerReceiver(ForgeDirection side) public PowerReceiver getPowerReceiver(ForgeDirection side)
{ {
if ( side.equals( side ) ) if ( side.equals( side ) )
return ((BaseMJPerdition) pp).getPowerReceiver(); return pp.getPowerReceiver();
return null; return null;
} }
@@ -169,7 +169,7 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
if ( Options.isEmpty() ) if ( Options.isEmpty() )
return amount; return amount;
PartP2PIC2Power x = (PartP2PIC2Power) Platform.pickRandom( Options ); PartP2PIC2Power x = Platform.pickRandom( Options );
if ( x != null && x.OutputEnergyA <= 0.001 ) if ( x != null && x.OutputEnergyA <= 0.001 )
{ {
@@ -80,7 +80,7 @@ public class PartP2PRedstone extends PartP2PTunnel<PartP2PRedstone>
{ {
PartP2PRedstone in = getInput(); PartP2PRedstone in = getInput();
if ( in != null ) if ( in != null )
putInput( ((PartP2PRedstone) in).power ); putInput( in.power );
} }
} }
@@ -51,7 +51,7 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
{ {
super.onPlacement( player, held, side ); super.onPlacement( player, held, side );
byte rotation = (byte) (MathHelper.floor_double( (double) ((player.rotationYaw * 4F) / 360F) + 2.5D ) & 3); byte rotation = (byte) (MathHelper.floor_double( (player.rotationYaw * 4F) / 360F + 2.5D ) & 3);
if ( side == ForgeDirection.UP ) if ( side == ForgeDirection.UP )
spin = rotation; spin = rotation;
else if ( side == ForgeDirection.DOWN ) else if ( side == ForgeDirection.DOWN )
@@ -63,7 +63,7 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
{ {
super.writeToNBT( data ); super.writeToNBT( data );
data.setFloat( "opacity", opacity ); data.setFloat( "opacity", opacity );
data.setByte( "spin", (byte) spin ); data.setByte( "spin", spin );
} }
@Override @Override
@@ -216,14 +216,14 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
{ {
GL11.glScalef( 1.0f, -1.0f, 1.0f ); GL11.glScalef( 1.0f, -1.0f, 1.0f );
GL11.glRotatef( 90.0f, 1.0f, 0.0f, 0.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 ) if ( d == ForgeDirection.DOWN )
{ {
GL11.glScalef( 1.0f, -1.0f, 1.0f ); GL11.glScalef( 1.0f, -1.0f, 1.0f );
GL11.glRotatef( -90.0f, 1.0f, 0.0f, 0.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 ) if ( d == ForgeDirection.EAST )
+2 -2
View File
@@ -92,8 +92,8 @@ public abstract class AEBaseInvTile extends AEBaseTile implements ISidedInventor
@Override @Override
public boolean isUseableByPlayer(EntityPlayer p) public boolean isUseableByPlayer(EntityPlayer p)
{ {
return this.worldObj.getTileEntity( this.xCoord, this.yCoord, this.zCoord ) != this ? false : p.getDistanceSq( (double) this.xCoord + 0.5D, return this.worldObj.getTileEntity( this.xCoord, this.yCoord, this.zCoord ) != this ? false : p.getDistanceSq( this.xCoord + 0.5D,
(double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D ) <= 32.0D; this.yCoord + 0.5D, this.zCoord + 0.5D ) <= 32.0D;
} }
@Override @Override
@@ -131,8 +131,8 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
double xOff = -0.15 * getUp().offsetX; double xOff = -0.15 * getUp().offsetX;
double yOff = -0.15 * getUp().offsetY; double yOff = -0.15 * getUp().offsetY;
double zOff = -0.15 * getUp().offsetZ; double zOff = -0.15 * getUp().offsetZ;
out.add( AxisAlignedBB.getBoundingBox( xOff + (double) 0.15, yOff + (double) 0.15, zOff + (double) 0.15,// ahh out.add( AxisAlignedBB.getBoundingBox( xOff + 0.15, yOff + 0.15, zOff + 0.15,// ahh
xOff + (double) 0.85, yOff + (double) 0.85, zOff + (double) 0.85 ) ); xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
} }
@Override @Override
@@ -162,7 +162,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
burnSpeed = Math.max( 20, Math.min( burnSpeed, 200 ) ); burnSpeed = Math.max( 20, Math.min( burnSpeed, 200 ) );
double dilation = burnSpeed / 100.0; double dilation = burnSpeed / 100.0;
double timePassed = (double) TicksSinceLastCall * dilation; double timePassed = TicksSinceLastCall * dilation;
burnTime -= timePassed; burnTime -= timePassed;
if ( burnTime < 0 ) if ( burnTime < 0 )
{ {
@@ -63,7 +63,7 @@ public abstract class InventoryAdaptor implements Iterable<ItemSlot>
} }
else if ( te instanceof TileEntityChest ) else if ( te instanceof TileEntityChest )
{ {
return new AdaptorIInventory( (IInventory) Platform.GetChestInv( te ) ); return new AdaptorIInventory( Platform.GetChestInv( te ) );
} }
else if ( isSpecialInventory( te ) ) else if ( isSpecialInventory( te ) )
{ {
+11 -11
View File
@@ -1212,9 +1212,9 @@ public class Platform
float f = 1.0F; float f = 1.0F;
float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f; float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f;
float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f; float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f;
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; double d0 = player.prevPosX + (player.posX - player.prevPosX) * f;
double d1 = eyeOffset; double d1 = eyeOffset;
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * f;
Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 ); Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 );
float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI ); float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI );
@@ -1229,7 +1229,7 @@ public class Platform
{ {
d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance();
} }
Vec3 vec31 = vec3.addVector( (double) f7 * d3, (double) f6 * d3, (double) f8 * d3 ); Vec3 vec31 = vec3.addVector( f7 * d3, f6 * d3, f8 * d3 );
return new LookDirection( vec3, vec31 ); return new LookDirection( vec3, vec31 );
} }
@@ -1240,9 +1240,9 @@ public class Platform
float f = 1.0F; float f = 1.0F;
float f1 = p.prevRotationPitch + (p.rotationPitch - p.prevRotationPitch) * f; float f1 = p.prevRotationPitch + (p.rotationPitch - p.prevRotationPitch) * f;
float f2 = p.prevRotationYaw + (p.rotationYaw - p.prevRotationYaw) * f; float f2 = p.prevRotationYaw + (p.rotationYaw - p.prevRotationYaw) * f;
double d0 = p.prevPosX + (p.posX - p.prevPosX) * (double) f; double d0 = p.prevPosX + (p.posX - p.prevPosX) * f;
double d1 = p.prevPosY + (p.posY - p.prevPosY) * (double) f + 1.62D - (double) p.yOffset; double d1 = p.prevPosY + (p.posY - p.prevPosY) * f + 1.62D - p.yOffset;
double d2 = p.prevPosZ + (p.posZ - p.prevPosZ) * (double) f; double d2 = p.prevPosZ + (p.posZ - p.prevPosZ) * f;
Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 ); Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 );
float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI ); float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI );
float f4 = MathHelper.sin( -f2 * 0.017453292F - (float) Math.PI ); float f4 = MathHelper.sin( -f2 * 0.017453292F - (float) Math.PI );
@@ -1252,7 +1252,7 @@ public class Platform
float f8 = f3 * f5; float f8 = f3 * f5;
double d3 = 32.0D; double d3 = 32.0D;
Vec3 vec31 = vec3.addVector( (double) f7 * d3, (double) f6 * d3, (double) f8 * d3 ); Vec3 vec31 = vec3.addVector( f7 * d3, f6 * d3, f8 * d3 );
AxisAlignedBB bb = AxisAlignedBB.getBoundingBox( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), AxisAlignedBB bb = AxisAlignedBB.getBoundingBox( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ),
Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ),
@@ -1278,7 +1278,7 @@ public class Platform
continue; continue;
f1 = 0.3F; f1 = 0.3F;
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 ); AxisAlignedBB boundingBox = entity1.boundingBox.expand( f1, f1, f1 );
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 ); MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
if ( movingObjectPosition != null ) if ( movingObjectPosition != null )
@@ -1603,9 +1603,9 @@ public class Platform
break; break;
} }
player.posX = (float) tile.xCoord + 0.5; player.posX = tile.xCoord + 0.5;
player.posY = (float) tile.yCoord + 0.5; player.posY = tile.yCoord + 0.5;
player.posZ = (float) tile.zCoord + 0.5; player.posZ = tile.zCoord + 0.5;
player.rotationPitch = player.prevCameraPitch = player.cameraPitch = pitch; player.rotationPitch = player.prevCameraPitch = player.cameraPitch = pitch;
player.rotationYaw = player.prevCameraYaw = player.cameraYaw = yaw; player.rotationYaw = player.prevCameraYaw = player.cameraYaw = yaw;
@@ -157,7 +157,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
* if ( FluidName != null && FluidName instanceof NBTTagString ) ((NBTTagString) FluidName).data = (String) * if ( FluidName != null && FluidName instanceof NBTTagString ) ((NBTTagString) FluidName).data = (String)
* this.fluid.getName(); else * this.fluid.getName(); else
*/ */
i.setString( "FluidName", (String) this.fluid.getName() ); i.setString( "FluidName", this.fluid.getName() );
/* /*
* if ( Count != null && Count instanceof NBTTagByte ) ((NBTTagByte) Count).data = (byte) 0; else * if ( Count != null && Count instanceof NBTTagByte ) ((NBTTagByte) Count).data = (byte) 0; else
@@ -5,7 +5,6 @@ import java.util.List;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import appeng.util.Platform; import appeng.util.Platform;
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@@ -81,7 +80,7 @@ public class AEItemDef
return true; return true;
if ( tagCompound != null && otherStack.hasTagCompound() ) if ( tagCompound != null && otherStack.hasTagCompound() )
return Platform.NBTEqualityTest( (NBTBase) tagCompound, otherStack.getTagCompound() ); return Platform.NBTEqualityTest( tagCompound, otherStack.getTagCompound() );
return true; return true;
} }
@@ -121,7 +121,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
if ( is.getItem() == def.item && is.getItemDamage() == this.def.damageValue ) if ( is.getItem() == def.item && is.getItemDamage() == this.def.damageValue )
{ {
NBTTagCompound ta = (NBTTagCompound) def.tagCompound; NBTTagCompound ta = def.tagCompound;
NBTTagCompound tb = is.getTagCompound(); NBTTagCompound tb = is.getTagCompound();
if ( ta == tb ) if ( ta == tb )
return true; return true;
@@ -203,7 +203,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
i.setShort( "Damage", (short) this.def.damageValue ); i.setShort( "Damage", (short) this.def.damageValue );
if ( def.tagCompound != null ) if ( def.tagCompound != null )
i.setTag( "tag", (NBTTagCompound) def.tagCompound ); i.setTag( "tag", def.tagCompound );
else else
i.removeTag( "tag" ); i.removeTag( "tag" );
+6 -6
View File
@@ -95,11 +95,11 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
void putPacketValue(ByteBuf tag, long num) throws IOException void putPacketValue(ByteBuf tag, long num) throws IOException
{ {
if ( num <= 255 ) if ( num <= 255 )
tag.writeByte( (byte) (num + (long) Byte.MIN_VALUE) ); tag.writeByte( (byte) (num + Byte.MIN_VALUE) );
else if ( num <= 65535 ) else if ( num <= 65535 )
tag.writeShort( (short) (num + (long) Short.MIN_VALUE) ); tag.writeShort( (short) (num + Short.MIN_VALUE) );
else if ( num <= 4294967295L ) else if ( num <= 4294967295L )
tag.writeInt( (int) (num + (long) Integer.MIN_VALUE) ); tag.writeInt( (int) (num + Integer.MIN_VALUE) );
else else
tag.writeLong( num ); tag.writeLong( num );
} }
@@ -109,19 +109,19 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
if ( type == 0 ) if ( type == 0 )
{ {
long l = tag.readByte(); long l = tag.readByte();
l -= (long) Byte.MIN_VALUE; l -= Byte.MIN_VALUE;
return l; return l;
} }
else if ( type == 1 ) else if ( type == 1 )
{ {
long l = tag.readShort(); long l = tag.readShort();
l -= (long) Short.MIN_VALUE; l -= Short.MIN_VALUE;
return l; return l;
} }
else if ( type == 2 ) else if ( type == 2 )
{ {
long l = tag.readInt(); long l = tag.readInt();
l -= (long) Integer.MIN_VALUE; l -= Integer.MIN_VALUE;
return l; return l;
} }
@@ -101,7 +101,7 @@ public class OreHelper
public boolean sameOre(AEItemStack aeItemStack, IAEItemStack is) public boolean sameOre(AEItemStack aeItemStack, IAEItemStack is)
{ {
OreReference a = aeItemStack.def.isOre; OreReference a = aeItemStack.def.isOre;
OreReference b = ((AEItemStack) aeItemStack).def.isOre; OreReference b = aeItemStack.def.isOre;
if ( a == b ) if ( a == b )
return true; return true;
@@ -25,7 +25,7 @@ public class DefaultPriorityList<T extends IAEStack<T>> implements IPartitionLis
@Override @Override
public Iterable<T> getItems() public Iterable<T> getItems()
{ {
return (Iterable<T>) nullList; return nullList;
} }
} }