Merge pull request #171 from iloveportalz0r/rv2

Fixed lots of warnings (mostly redundant code)
This commit is contained in:
thatsIch
2014-09-29 09:34:07 +02:00
167 changed files with 575 additions and 404 deletions
+2 -1
View File
@@ -1,7 +1,6 @@
package appeng.block; package appeng.block;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
@@ -757,11 +756,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return hasSubtypes; return hasSubtypes;
} }
@Override
public boolean hasComparatorInputOverride() public boolean hasComparatorInputOverride()
{ {
return isInventory; return isInventory;
} }
@Override
public int getComparatorInputOverride(World w, int x, int y, int z, int s) public int getComparatorInputOverride(World w, int x, int y, int z, int s)
{ {
TileEntity te = getTileEntity( w, x, y, z ); TileEntity te = getTileEntity( w, x, y, z );
@@ -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;
} }
@@ -72,16 +72,19 @@ public class BlockPaint extends AEBaseBlock
tp.onNeighborBlockChange(); tp.onNeighborBlockChange();
} }
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
{ {
return null; return null;
} }
@Override
public boolean canCollideCheck(int p_149678_1_, boolean p_149678_2_) public boolean canCollideCheck(int p_149678_1_, boolean p_149678_2_)
{ {
return false; return false;
} }
@Override
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_,
int p_149690_7_) int p_149690_7_)
{ {
@@ -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 );
} }
} }
} }
@@ -61,6 +61,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
static public Class<? extends TileEntity> noTesrTile; static public Class<? extends TileEntity> noTesrTile;
static public Class<? extends TileEntity> tesrTile; static public Class<? extends TileEntity> tesrTile;
@Override
public <T extends TileEntity> T getTileEntity(IBlockAccess w, int x, int y, int z) public <T extends TileEntity> T getTileEntity(IBlockAccess w, int x, int y, int z)
{ {
TileEntity te = w.getTileEntity( x, y, z ); TileEntity te = w.getTileEntity( x, y, z );
@@ -89,6 +90,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
return 0; return 0;
} }
@Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer) public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer)
{ {
@@ -113,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 );
@@ -135,6 +137,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
return true; return true;
} }
@Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
{ {
@@ -159,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
+11 -10
View File
@@ -414,6 +414,7 @@ public abstract class AEBaseGui extends GuiContainer
super.handleMouseClick( slot, slotIdx, ctrlDown, key ); super.handleMouseClick( slot, slotIdx, ctrlDown, key );
} }
@Override
protected void mouseClickMove(int x, int y, int c, long d) protected void mouseClickMove(int x, int y, int c, long d)
{ {
Slot slot = this.getSlot( x, y ); Slot slot = this.getSlot( x, y );
@@ -559,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 )
{ {
@@ -601,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 )
{ {
@@ -876,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();
} }
@@ -142,6 +142,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
buttonList.add( copyMode ); buttonList.add( copyMode );
} }
@Override
protected void handleButtonVisibility() protected void handleButtonVisibility()
{ {
copyMode.setState( workbench.copyMode == CopyMode.CLEAR_ON_REMOVE ); copyMode.setState( workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
@@ -160,11 +161,13 @@ public class GuiCellWorkbench extends GuiUpgradeable
fuzzyMode.setVisibility( hasFuzzy ); fuzzyMode.setVisibility( hasFuzzy );
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/cellworkbench.png"; return "guis/cellworkbench.png";
} }
@Override
protected GuiText getName() protected GuiText getName()
{ {
return GuiText.CellWorkbench; return GuiText.CellWorkbench;
@@ -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() ) );
@@ -67,6 +67,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
reservedSpace = 73; reservedSpace = 73;
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/crafting.png"; return "guis/crafting.png";
@@ -64,6 +64,7 @@ public class GuiFormationPlane extends GuiUpgradeable
} }
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/storagebus.png"; return "guis/storagebus.png";
@@ -88,6 +88,7 @@ public class GuiIOPort extends GuiUpgradeable
} }
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/ioport.png"; return "guis/ioport.png";
@@ -81,6 +81,7 @@ public class GuiInterface extends GuiUpgradeable
buttonList.add( interfaceMode ); buttonList.add( interfaceMode );
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/interface.png"; return "guis/interface.png";
@@ -148,6 +148,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
} }
} }
@Override
protected void handleButtonVisibility() protected void handleButtonVisibility()
{ {
craftingMode.setVisibility( bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 ); craftingMode.setVisibility( bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
@@ -226,11 +227,13 @@ public class GuiLevelEmitter extends GuiUpgradeable
level.drawTextBox(); level.drawTextBox();
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/lvlemitter.png"; return "guis/lvlemitter.png";
} }
@Override
protected GuiText getName() protected GuiText getName()
{ {
return GuiText.LevelEmitter; return GuiText.LevelEmitter;
@@ -50,6 +50,7 @@ public class GuiMAC extends GuiUpgradeable
buttonList.add( redstoneMode ); buttonList.add( redstoneMode );
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/mac.png"; return "guis/mac.png";
@@ -61,6 +62,7 @@ public class GuiMAC extends GuiUpgradeable
this.container = (ContainerMAC) this.inventorySlots; this.container = (ContainerMAC) this.inventorySlots;
} }
@Override
protected GuiText getName() protected GuiText getName()
{ {
return GuiText.MolecularAssembler; return GuiText.MolecularAssembler;
@@ -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;
@@ -459,6 +459,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
repo.updateView(); repo.updateView();
} }
@Override
protected boolean isPowered() protected boolean isPowered()
{ {
return repo.hasPower(); return repo.hasPower();
@@ -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();
@@ -83,6 +83,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
// } // }
} }
@Override
protected void repositionSlot(AppEngSlot s) protected void repositionSlot(AppEngSlot s)
{ {
if ( s.isPlayerSide() ) if ( s.isPlayerSide() )
@@ -97,6 +98,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
reservedSpace = 81; reservedSpace = 81;
} }
@Override
protected String getBackground() protected String getBackground()
{ {
if ( container.craftingMode ) if ( container.craftingMode )
@@ -50,6 +50,7 @@ public class GuiSecurity extends GuiMEMonitorable
.getUnlocalizedName(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) ); .getUnlocalizedName(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
} }
@Override
protected void actionPerformed(net.minecraft.client.gui.GuiButton btn) protected void actionPerformed(net.minecraft.client.gui.GuiButton btn)
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
@@ -81,6 +82,7 @@ public class GuiSecurity extends GuiMEMonitorable
} }
@Override
protected String getBackground() protected String getBackground()
{ {
ContainerSecurity cs = (ContainerSecurity) inventorySlots; ContainerSecurity cs = (ContainerSecurity) inventorySlots;
@@ -103,6 +103,7 @@ public class GuiStorageBus extends GuiUpgradeable
} }
} }
@Override
protected String getBackground() protected String getBackground()
{ {
return "guis/storagebus.png"; return "guis/storagebus.png";
@@ -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)
@@ -370,6 +370,7 @@ public class BusRenderHelper implements IPartRenderHelper
BusRenderer.instance.renderer.renderFaces = faces; BusRenderer.instance.renderer.renderFaces = faces;
} }
@Override
public void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer) public void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer)
{ {
if ( !renderThis() ) if ( !renderThis() )
@@ -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 */);
@@ -21,6 +21,7 @@ public class CraftingFx extends EntityBreakingFX
private int startBlkY; private int startBlkY;
private int startBlkZ; private int startBlkZ;
@Override
public int getFXLayer() public int getFXLayer()
{ {
return 1; return 1;
@@ -50,6 +51,7 @@ public class CraftingFx extends EntityBreakingFX
this.particleScale *= 0.8f; this.particleScale *= 0.8f;
} }
@Override
public void onUpdate() public void onUpdate()
{ {
super.onUpdate(); super.onUpdate();
@@ -57,6 +59,7 @@ public class CraftingFx extends EntityBreakingFX
this.particleAlpha *= 0.51f; this.particleAlpha *= 0.51f;
} }
@Override
public void renderParticle(Tessellator par1Tessellator, float partialTick, float x, float y, float z, float rx, float rz) public void renderParticle(Tessellator par1Tessellator, float partialTick, float x, float y, float z, float rx, float rz)
{ {
if ( partialTick < 0 || partialTick > 1 ) if ( partialTick < 0 || partialTick > 1 )
@@ -68,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 );
@@ -84,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 );
} }
} }
@@ -21,6 +21,7 @@ public class EnergyFx extends EntityBreakingFX
private int startBlkY; private int startBlkY;
private int startBlkZ; private int startBlkZ;
@Override
public int getFXLayer() public int getFXLayer()
{ {
return 1; return 1;
@@ -49,6 +50,7 @@ public class EnergyFx extends EntityBreakingFX
this.particleScale *= 0.8f; this.particleScale *= 0.8f;
} }
@Override
public void onUpdate() public void onUpdate()
{ {
super.onUpdate(); super.onUpdate();
@@ -56,6 +58,7 @@ public class EnergyFx extends EntityBreakingFX
this.particleAlpha *= 0.89f; this.particleAlpha *= 0.89f;
} }
@Override
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7) public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{ {
float f6 = this.particleTextureIndex.getMinU(); float f6 = this.particleTextureIndex.getMinU();
@@ -64,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 );
@@ -76,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();
} }
@@ -276,6 +276,7 @@ public abstract class AEBaseContainer extends Container
return null; return null;
} }
@Override
public boolean canDragIntoSlot(Slot s) public boolean canDragIntoSlot(Slot s)
{ {
return ((AppEngSlot) s).isDraggable; return ((AppEngSlot) s).isDraggable;
@@ -574,6 +575,7 @@ public abstract class AEBaseContainer extends Container
super.detectAndSendChanges(); super.detectAndSendChanges();
} }
@Override
final public void updateProgressBar(int idx, int value) final public void updateProgressBar(int idx, int value)
{ {
if ( syncData.containsKey( idx ) ) if ( syncData.containsKey( idx ) )
@@ -588,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 );
} }
@@ -28,6 +28,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
/** /**
* Callback for when the crafting matrix is changed. * Callback for when the crafting matrix is changed.
*/ */
@Override
public void onCraftMatrixChanged(IInventory par1IInventory) public void onCraftMatrixChanged(IInventory par1IInventory)
{ {
ContainerNull cn = new ContainerNull(); ContainerNull cn = new ContainerNull();
@@ -4,7 +4,6 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import appeng.api.AEApi; import appeng.api.AEApi;
import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput; import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput; import appeng.container.slot.SlotRestrictedInput;
@@ -70,6 +69,7 @@ public class ContainerInscriber extends ContainerUpgradeable
setupUpgrades(); setupUpgrades();
} }
@Override
public boolean isValidForSlot(Slot s, ItemStack is) public boolean isValidForSlot(Slot s, ItemStack is)
{ {
ItemStack PlateA = ti.getStackInSlot( 0 ); ItemStack PlateA = ti.getStackInSlot( 0 );
@@ -51,12 +51,14 @@ public class ContainerInterface extends ContainerUpgradeable
setupUpgrades(); setupUpgrades();
} }
@Override
protected void loadSettingsFromHost(IConfigManager cm) protected void loadSettingsFromHost(IConfigManager cm)
{ {
this.bMode = (YesNo) cm.getSetting( Settings.BLOCK ); this.bMode = (YesNo) cm.getSetting( Settings.BLOCK );
this.iTermMode = (YesNo) cm.getSetting( Settings.INTERFACE_TERMINAL ); this.iTermMode = (YesNo) cm.getSetting( Settings.INTERFACE_TERMINAL );
} }
@Override
public int availableUpgrades() public int availableUpgrades()
{ {
return 1; return 1;
@@ -103,6 +103,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
standardDetectAndSendChanges(); standardDetectAndSendChanges();
} }
@Override
public void onUpdate(String field, Object oldValue, Object newValue) public void onUpdate(String field, Object oldValue, Object newValue)
{ {
if ( field.equals( "EmitterValue" ) ) if ( field.equals( "EmitterValue" ) )
@@ -26,6 +26,7 @@ public class ContainerMAC extends ContainerUpgradeable
tma = te; tma = te;
} }
@Override
public int availableUpgrades() public int availableUpgrades()
{ {
return 5; return 5;
@@ -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();
} }
} }
@@ -37,6 +37,7 @@ public class AppEngCraftingSlot extends AppEngSlot
/** /**
* Check if the stack is a valid item for this slot. Always true beside for the armor slots. * Check if the stack is a valid item for this slot. Always true beside for the armor slots.
*/ */
@Override
public boolean isItemValid(ItemStack par1ItemStack) public boolean isItemValid(ItemStack par1ItemStack)
{ {
return false; return false;
@@ -46,6 +47,7 @@ public class AppEngCraftingSlot extends AppEngSlot
* Decrease the size of the stack in slot (first int arg) by the amount of the second int arg. Returns the new * Decrease the size of the stack in slot (first int arg) by the amount of the second int arg. Returns the new
* stack. * stack.
*/ */
@Override
public ItemStack decrStackSize(int par1) public ItemStack decrStackSize(int par1)
{ {
if ( this.getHasStack() ) if ( this.getHasStack() )
@@ -60,6 +62,7 @@ public class AppEngCraftingSlot extends AppEngSlot
* the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an
* internal count then calls onCrafting(item). * internal count then calls onCrafting(item).
*/ */
@Override
protected void onCrafting(ItemStack par1ItemStack, int par2) protected void onCrafting(ItemStack par1ItemStack, int par2)
{ {
this.amountCrafted += par2; this.amountCrafted += par2;
@@ -69,6 +72,7 @@ public class AppEngCraftingSlot extends AppEngSlot
/** /**
* the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood.
*/ */
@Override
protected void onCrafting(ItemStack par1ItemStack) protected void onCrafting(ItemStack par1ItemStack)
{ {
par1ItemStack.onCrafting( this.thePlayer.worldObj, this.thePlayer, this.amountCrafted ); par1ItemStack.onCrafting( this.thePlayer.worldObj, this.thePlayer, this.amountCrafted );
@@ -125,6 +129,7 @@ public class AppEngCraftingSlot extends AppEngSlot
} }
} }
@Override
public void onPickupFromSlot(EntityPlayer par1EntityPlayer, ItemStack par2ItemStack) public void onPickupFromSlot(EntityPlayer par1EntityPlayer, ItemStack par2ItemStack)
{ {
FMLCommonHandler.instance().firePlayerCraftingEvent( par1EntityPlayer, par2ItemStack, craftMatrix ); FMLCommonHandler.instance().firePlayerCraftingEvent( par1EntityPlayer, par2ItemStack, craftMatrix );
+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())
@@ -137,6 +137,7 @@ public class MovableTileRegistry implements IMovableRegistry
blacklisted.add( blk ); blacklisted.add( blk );
} }
@Override
public boolean isBlacklisted(Block blk) public boolean isBlacklisted(Block blk)
{ {
return blacklisted.contains( blk ); return blacklisted.contains( blk );
@@ -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,12 +49,14 @@ 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;
} }
} ); } );
in = CompressedStreamTools.read( new DataInputStream( gzReader ) ); DataInputStream inStream = new DataInputStream( gzReader );
in = CompressedStreamTools.read( inStream );
inStream.close();
} }
@Override @Override
@@ -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 )
@@ -42,6 +42,7 @@ public class CraftingJob implements Runnable, ICraftingJob
long bytes = 0; long bytes = 0;
World world; World world;
@Override
public IAEItemStack getOutput() public IAEItemStack getOutput()
{ {
return output; return output;
@@ -93,6 +94,7 @@ public class CraftingJob implements Runnable, ICraftingJob
return new CraftingTreeNode( cc, this, what, null, -1, 0 ); return new CraftingTreeNode( cc, this, what, null, -1, 0 );
} }
@Override
public long getByteTotal() public long getByteTotal()
{ {
return bytes; return bytes;
@@ -237,6 +239,7 @@ public class CraftingJob implements Runnable, ICraftingJob
} }
} }
@Override
public boolean isSimulation() public boolean isSimulation()
{ {
return simulate; return simulate;
@@ -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 );
@@ -24,6 +24,7 @@ final public class EntityFloatingItem extends EntityItem
// public boolean isEntityAlive() // public boolean isEntityAlive()
@Override
public void onUpdate() public void onUpdate()
{ {
if ( !isDead && parent.isDead ) if ( !isDead && parent.isDead )
@@ -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 ) );
@@ -29,6 +29,7 @@ public class FacadeContainer implements IFacadeContainer
storage = cbs; storage = cbs;
} }
@Override
public void writeToStream(ByteBuf out) throws IOException public void writeToStream(ByteBuf out) throws IOException
{ {
int facadeSides = 0; int facadeSides = 0;
@@ -52,6 +53,7 @@ public class FacadeContainer implements IFacadeContainer
} }
} }
@Override
public boolean readFromStream(ByteBuf out) throws IOException public boolean readFromStream(ByteBuf out) throws IOException
{ {
int facadeSides = out.readByte(); int facadeSides = out.readByte();
@@ -97,6 +99,7 @@ public class FacadeContainer implements IFacadeContainer
return changed; return changed;
} }
@Override
public void readFromNBT(NBTTagCompound c) public void readFromNBT(NBTTagCompound c)
{ {
for (int x = 0; x < facades; x++) for (int x = 0; x < facades; x++)
@@ -126,6 +129,7 @@ public class FacadeContainer implements IFacadeContainer
} }
} }
@Override
public void writeToNBT(NBTTagCompound c) public void writeToNBT(NBTTagCompound c)
{ {
for (int x = 0; x < facades; x++) for (int x = 0; x < facades; x++)
@@ -170,6 +174,7 @@ public class FacadeContainer implements IFacadeContainer
return storage.getFacade( s.ordinal() ); return storage.getFacade( s.ordinal() );
} }
@Override
public boolean isEmpty() public boolean isEmpty()
{ {
for (int x = 0; x < facades; x++) for (int x = 0; x < facades; x++)
@@ -178,6 +183,7 @@ public class FacadeContainer implements IFacadeContainer
return true; return true;
} }
@Override
public void rotateLeft() public void rotateLeft()
{ {
IFacadePart newFacades[] = new FacadePart[6]; IFacadePart newFacades[] = new FacadePart[6];
@@ -10,6 +10,7 @@ public class AEGlassMaterial extends Material
super( p_i2116_1_ ); super( p_i2116_1_ );
} }
@Override
public boolean isOpaque() public boolean isOpaque()
{ {
return false; return false;
@@ -690,6 +690,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
return (IPart) (iHost instanceof IPart ? iHost : null); return (IPart) (iHost instanceof IPart ? iHost : null);
} }
@Override
public appeng.api.util.IConfigManager getConfigManager() public appeng.api.util.IConfigManager getConfigManager()
{ {
return cm; return cm;
@@ -1009,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 );
@@ -83,6 +83,7 @@ public class MeteoritePlacer
} }
@Override
public void getRandomFall(IMeteoriteWorld w, int x, int y, int z) public void getRandomFall(IMeteoriteWorld w, int x, int y, int z)
{ {
double a = Math.random(); double a = Math.random();
@@ -92,6 +93,7 @@ public class MeteoritePlacer
getOther( w, x, y, z, a ); getOther( w, x, y, z, a );
} }
@Override
public void getRandomInset(IMeteoriteWorld w, int x, int y, int z) public void getRandomInset(IMeteoriteWorld w, int x, int y, int z)
{ {
double a = Math.random(); double a = Math.random();
@@ -111,11 +113,13 @@ public class MeteoritePlacer
super( w, x, y, z ); super( w, x, y, z );
} }
@Override
public int adjustCrater() public int adjustCrater()
{ {
return 2; return 2;
} }
@Override
public void getOther(IMeteoriteWorld w, int x, int y, int z, double a) public void getOther(IMeteoriteWorld w, int x, int y, int z, double a)
{ {
if ( a > 0.66 ) if ( a > 0.66 )
@@ -131,11 +135,13 @@ public class MeteoritePlacer
super( w, x, y, z ); super( w, x, y, z );
} }
@Override
public int adjustCrater() public int adjustCrater()
{ {
return 2; return 2;
} }
@Override
public void getOther(IMeteoriteWorld w, int x, int y, int z, double a) public void getOther(IMeteoriteWorld w, int x, int y, int z, double a)
{ {
if ( a > 0.7 ) if ( a > 0.7 )
@@ -206,6 +206,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
condensedOutputs[offset++] = io; condensedOutputs[offset++] = io;
} }
@Override
synchronized public boolean isValidItemForSlot(int slotIndex, ItemStack i, World w) synchronized public boolean isValidItemForSlot(int slotIndex, ItemStack i, World w)
{ {
if ( isCrafting == false ) if ( isCrafting == false )
+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;
@@ -160,6 +160,7 @@ public class FZ implements IFZ, IIntegrationModule
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new FactorizationHandler() ); AEApi.instance().registries().externalStorage().addExternalStorageInterface( new FactorizationHandler() );
} }
@Override
public void grinderRecipe(ItemStack in, ItemStack out) public void grinderRecipe(ItemStack in, ItemStack out)
{ {
try try
@@ -29,11 +29,13 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
{ {
@Override
public void loadTransferRects() public void loadTransferRects()
{ {
this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "crafting", new Object[0] ) ); this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "crafting", new Object[0] ) );
} }
@Override
public Class<? extends GuiContainer> getGuiClass() public Class<? extends GuiContainer> getGuiClass()
{ {
return GuiCrafting.class; return GuiCrafting.class;
@@ -70,6 +72,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadCraftingRecipes(ItemStack result) public void loadCraftingRecipes(ItemStack result)
{ {
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList(); List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
@@ -87,6 +90,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadUsageRecipes(ItemStack ingredient) public void loadUsageRecipes(ItemStack ingredient)
{ {
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList(); List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
@@ -109,11 +113,13 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public String getGuiTexture() public String getGuiTexture()
{ {
return "textures/gui/container/crafting_table.png"; return "textures/gui/container/crafting_table.png";
} }
@Override
public String getOverlayIdentifier() public String getOverlayIdentifier()
{ {
return "crafting"; return "crafting";
@@ -29,11 +29,13 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
{ {
@Override
public void loadTransferRects() public void loadTransferRects()
{ {
this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "crafting", new Object[0] ) ); this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "crafting", new Object[0] ) );
} }
@Override
public Class<? extends GuiContainer> getGuiClass() public Class<? extends GuiContainer> getGuiClass()
{ {
return GuiCrafting.class; return GuiCrafting.class;
@@ -70,6 +72,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadCraftingRecipes(ItemStack result) public void loadCraftingRecipes(ItemStack result)
{ {
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList(); List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
@@ -87,6 +90,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadUsageRecipes(ItemStack ingredient) public void loadUsageRecipes(ItemStack ingredient)
{ {
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList(); List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
@@ -109,11 +113,13 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public String getGuiTexture() public String getGuiTexture()
{ {
return "textures/gui/container/crafting_table.png"; return "textures/gui/container/crafting_table.png";
} }
@Override
public String getOverlayIdentifier() public String getOverlayIdentifier()
{ {
return "crafting"; return "crafting";
@@ -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();
@@ -25,11 +25,13 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
final ItemFacade ifa = (ItemFacade) AEApi.instance().items().itemFacade.item(); final ItemFacade ifa = (ItemFacade) AEApi.instance().items().itemFacade.item();
final ItemStack cable_anchor = AEApi.instance().parts().partCableAnchor.stack( 1 ); final ItemStack cable_anchor = AEApi.instance().parts().partCableAnchor.stack( 1 );
@Override
public void loadTransferRects() public void loadTransferRects()
{ {
this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "crafting", new Object[0] ) ); this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "crafting", new Object[0] ) );
} }
@Override
public Class<? extends GuiContainer> getGuiClass() public Class<? extends GuiContainer> getGuiClass()
{ {
return GuiCrafting.class; return GuiCrafting.class;
@@ -61,6 +63,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadCraftingRecipes(ItemStack result) public void loadCraftingRecipes(ItemStack result)
{ {
if ( result.getItem() == ifa ) if ( result.getItem() == ifa )
@@ -71,6 +74,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadUsageRecipes(ItemStack ingredient) public void loadUsageRecipes(ItemStack ingredient)
{ {
List<ItemStack> facades = ifa.getFacades(); List<ItemStack> facades = ifa.getFacades();
@@ -90,11 +94,13 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public String getGuiTexture() public String getGuiTexture()
{ {
return "textures/gui/container/crafting_table.png"; return "textures/gui/container/crafting_table.png";
} }
@Override
public String getOverlayIdentifier() public String getOverlayIdentifier()
{ {
return "crafting"; return "crafting";
@@ -29,6 +29,7 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
public class NEIGrinderRecipeHandler extends TemplateRecipeHandler public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
{ {
@Override
public void drawBackground(int recipe) public void drawBackground(int recipe)
{ {
GL11.glColor4f( 1, 1, 1, 1 ); GL11.glColor4f( 1, 1, 1, 1 );
@@ -62,11 +63,13 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadTransferRects() public void loadTransferRects()
{ {
this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "grindstone", new Object[0] ) ); this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "grindstone", new Object[0] ) );
} }
@Override
public Class<? extends GuiContainer> getGuiClass() public Class<? extends GuiContainer> getGuiClass()
{ {
return GuiGrinder.class; return GuiGrinder.class;
@@ -96,6 +99,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadCraftingRecipes(ItemStack result) public void loadCraftingRecipes(ItemStack result)
{ {
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes()) for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
@@ -109,6 +113,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadUsageRecipes(ItemStack ingredient) public void loadUsageRecipes(ItemStack ingredient)
{ {
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes()) for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
@@ -127,6 +132,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public String getGuiTexture() public String getGuiTexture()
{ {
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/guis/grinder.png" ); ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/guis/grinder.png" );
@@ -134,6 +140,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
return f; return f;
} }
@Override
public String getOverlayIdentifier() public String getOverlayIdentifier()
{ {
return "grindstone"; return "grindstone";
@@ -27,6 +27,7 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
public class NEIInscriberRecipeHandler extends TemplateRecipeHandler public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
{ {
@Override
public void drawBackground(int recipe) public void drawBackground(int recipe)
{ {
GL11.glColor4f( 1, 1, 1, 1 ); GL11.glColor4f( 1, 1, 1, 1 );
@@ -34,11 +35,13 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
drawTexturedModalRect( 0, 0, 5, 11, 166, 75 ); drawTexturedModalRect( 0, 0, 5, 11, 166, 75 );
} }
@Override
public void loadTransferRects() public void loadTransferRects()
{ {
this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "inscriber", new Object[0] ) ); this.transferRects.add( new TemplateRecipeHandler.RecipeTransferRect( new Rectangle( 84, 23, 24, 18 ), "inscriber", new Object[0] ) );
} }
@Override
public Class<? extends GuiContainer> getGuiClass() public Class<? extends GuiContainer> getGuiClass()
{ {
return GuiInscriber.class; return GuiInscriber.class;
@@ -68,6 +71,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadCraftingRecipes(ItemStack result) public void loadCraftingRecipes(ItemStack result)
{ {
for (InscriberRecipe recipe : Inscribe.recipes) for (InscriberRecipe recipe : Inscribe.recipes)
@@ -81,6 +85,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public void loadUsageRecipes(ItemStack ingredient) public void loadUsageRecipes(ItemStack ingredient)
{ {
for (InscriberRecipe recipe : Inscribe.recipes) for (InscriberRecipe recipe : Inscribe.recipes)
@@ -99,6 +104,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
} }
} }
@Override
public String getGuiTexture() public String getGuiTexture()
{ {
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/guis/inscriber.png" ); ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/guis/inscriber.png" );
@@ -106,6 +112,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
return f; return f;
} }
@Override
public String getOverlayIdentifier() public String getOverlayIdentifier()
{ {
return "inscriber"; return "inscriber";
@@ -87,6 +87,7 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
return offsets.size(); return offsets.size();
} }
@Override
public void drawBackground(int recipe) public void drawBackground(int recipe)
{ {
GL11.glColor4f( 1, 1, 1, 1 );// nothing. GL11.glColor4f( 1, 1, 1, 1 );// nothing.
@@ -32,6 +32,7 @@ public class PortableCellViewer extends MEMonitorHandler<IAEItemStack> implement
target = is; target = is;
} }
@Override
public ItemStack getItemStack() public ItemStack getItemStack()
{ {
return target; return target;
@@ -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() {
@@ -221,8 +221,8 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
egc.motionY = location.motionY; egc.motionY = location.motionY;
egc.motionZ = location.motionZ; egc.motionZ = location.motionZ;
if ( location instanceof EntityItem && egc instanceof EntityItem ) if ( location instanceof EntityItem )
((EntityItem) egc).delayBeforeCanPickup = ((EntityItem) location).delayBeforeCanPickup; egc.delayBeforeCanPickup = ((EntityItem) location).delayBeforeCanPickup;
return egc; return egc;
} }
@@ -157,6 +157,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
Collections.sort( list, new Comparator<IAEItemStack>() { Collections.sort( list, new Comparator<IAEItemStack>() {
@Override
public int compare(IAEItemStack a, IAEItemStack b) public int compare(IAEItemStack a, IAEItemStack b)
{ {
return ItemSorters.compareInt( a.getItemDamage(), b.getItemDamage() ); return ItemSorters.compareInt( a.getItemDamage(), b.getItemDamage() );
@@ -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,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue; continue;
float f1 = 0.3F; float 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 )
@@ -255,7 +256,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 +322,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue; continue;
float f1 = 0.3F; float 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 )
@@ -372,7 +374,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 );
@@ -21,6 +21,7 @@ public class ToolQuartzAxe extends ItemAxe implements IAEFeature
return feature; return feature;
} }
@Override
public boolean getIsRepairable(ItemStack a, ItemStack b) public boolean getIsRepairable(ItemStack a, ItemStack b)
{ {
return Platform.canRepair( type, a, b ); return Platform.canRepair( type, a, b );
@@ -26,6 +26,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
setMaxStackSize( 1 ); setMaxStackSize( 1 );
} }
@Override
public boolean getIsRepairable(ItemStack a, ItemStack b) public boolean getIsRepairable(ItemStack a, ItemStack b)
{ {
return Platform.canRepair( type, a, b ); return Platform.canRepair( type, a, b );
@@ -21,6 +21,7 @@ public class ToolQuartzHoe extends ItemHoe implements IAEFeature
return feature; return feature;
} }
@Override
public boolean getIsRepairable(ItemStack a, ItemStack b) public boolean getIsRepairable(ItemStack a, ItemStack b)
{ {
return Platform.canRepair( type, a, b ); return Platform.canRepair( type, a, b );
@@ -21,6 +21,7 @@ public class ToolQuartzPickaxe extends ItemPickaxe implements IAEFeature
return feature; return feature;
} }
@Override
public boolean getIsRepairable(ItemStack a, ItemStack b) public boolean getIsRepairable(ItemStack a, ItemStack b)
{ {
return Platform.canRepair( type, a, b ); return Platform.canRepair( type, a, b );
@@ -21,6 +21,7 @@ public class ToolQuartzSpade extends ItemSpade implements IAEFeature
return feature; return feature;
} }
@Override
public boolean getIsRepairable(ItemStack a, ItemStack b) public boolean getIsRepairable(ItemStack a, ItemStack b)
{ {
return Platform.canRepair( type, a, b ); return Platform.canRepair( type, a, b );
@@ -21,6 +21,7 @@ public class ToolQuartzSword extends ItemSword implements IAEFeature
return feature; return feature;
} }
@Override
public boolean getIsRepairable(ItemStack a, ItemStack b) public boolean getIsRepairable(ItemStack a, ItemStack b)
{ {
return Platform.canRepair( type, a, b ); return Platform.canRepair( type, a, b );
+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;

Some files were not shown because too many files have changed in this diff Show More