Reduce scope of variables

This commit is contained in:
thatsIch 2015-09-30 14:22:21 +02:00
parent dca09fe0a6
commit 059523f543
70 changed files with 151 additions and 199 deletions

View File

@ -575,7 +575,6 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
final EnumFacing forward = ori.getForward();
final EnumFacing up = ori.getUp();
EnumFacing west = null;
if( forward == null || up == null )
{
@ -586,6 +585,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
EnumFacing west = null;
for( EnumFacing dx : EnumFacing.VALUES )
{
if( dx.getFrontOffsetX() == west_x && dx.getFrontOffsetY() == west_y && dx.getFrontOffsetZ() == west_z )
@ -633,22 +633,15 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
String name )
{
final BlockRenderInfo info = this.getRendererInstance();
final FlippableIcon blockIcon;
final FlippableIcon topIcon;
final FlippableIcon bottomIcon;
final FlippableIcon sideIcon;
final FlippableIcon eastIcon;
final FlippableIcon westIcon;
final FlippableIcon southIcon;
final FlippableIcon northIcon;
blockIcon = topIcon = this.optionalIcon( clientHelper, this.getTextureName(), null );
bottomIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Bottom", topIcon );
sideIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Side", topIcon );
eastIcon = this.optionalIcon( clientHelper, this.getTextureName() + "East", sideIcon );
westIcon = this.optionalIcon( clientHelper, this.getTextureName() + "West", sideIcon );
southIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Front", sideIcon );
northIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Back", sideIcon );
final FlippableIcon blockIcon = topIcon = this.optionalIcon( clientHelper, this.getTextureName(), null );
final FlippableIcon bottomIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Bottom", topIcon );
final FlippableIcon sideIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Side", topIcon );
final FlippableIcon eastIcon = this.optionalIcon( clientHelper, this.getTextureName() + "East", sideIcon );
final FlippableIcon westIcon = this.optionalIcon( clientHelper, this.getTextureName() + "West", sideIcon );
final FlippableIcon southIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Front", sideIcon );
final FlippableIcon northIcon = this.optionalIcon( clientHelper, this.getTextureName() + "Back", sideIcon );
info.updateIcons( bottomIcon, topIcon, northIcon, southIcon, eastIcon, westIcon );
}

View File

@ -104,8 +104,6 @@ public class AEBaseItemBlock extends ItemBlock
EnumFacing up = null;
EnumFacing forward = null;
IOrientable ori = null;
if( this.blockType instanceof AEBaseTileBlock )
{
if( this.blockType instanceof BlockLightDetector )
@ -168,6 +166,7 @@ public class AEBaseItemBlock extends ItemBlock
}
}
IOrientable ori = null;
if( this.blockType instanceof IOrientableBlock )
{
ori = ( (IOrientableBlock) this.blockType ).getOrientable( w, pos );

View File

@ -23,6 +23,8 @@ import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import com.google.common.base.Optional;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@ -30,6 +32,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import appeng.api.util.AEPartLocation;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
@ -40,8 +43,6 @@ import appeng.helpers.ICustomCollision;
import appeng.tile.storage.TileSkyChest;
import appeng.util.Platform;
import com.google.common.base.Optional;
public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
{
@ -98,7 +99,6 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
boolean b )
{
TileSkyChest sk = this.getTileEntity( w, pos );
double sc = 0.06;
EnumFacing o = EnumFacing.UP;
if( sk != null )
@ -110,6 +110,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
double offsetY = o.getFrontOffsetY() == 0 ? 0.06 : 0.0;
double offsetZ = o.getFrontOffsetZ() == 0 ? 0.06 : 0.0;
double sc = 0.06;
return Collections.singletonList( AxisAlignedBB.fromBounds( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) );
}

View File

@ -264,8 +264,6 @@ public class ClientHelper extends ServerHelper
inst.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed( inst ) );
inst.entityRenderMap.put( EntityFloatingItem.class, new RenderFloatingItem( inst ) );
String MODID = AppEng.MOD_ID + ":";
final ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
ItemMeshDefinition imd = new ItemMeshDefinition()
{
@ -314,6 +312,7 @@ public class ClientHelper extends ServerHelper
}
}
String MODID = AppEng.MOD_ID + ":";
for( List<IconReg> reg : iconRegistrations.values() )
{
String[] names = new String[reg.size()];

View File

@ -818,17 +818,17 @@ public abstract class AEBaseGui extends GuiContainer
float par2 = aes.yDisplayPosition;
float par3 = uv_x * 16;
float par4 = uv_y * 16;
float par5 = 16;
float par6 = 16;
Tessellator tessellator = Tessellator.getInstance();
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
float f = 0.00390625F;
float f1 = 0.00390625F;
worldrenderer.startDrawingQuads();
worldrenderer.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
float f1 = 0.00390625F;
float f = 0.00390625F;
float par6 = 16;
worldrenderer.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, ( par3 + 0 ) * f, ( par4 + par6 ) * f1 );
float par5 = 16;
worldrenderer.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel, ( par3 + par5 ) * f, ( par4 + par6 ) * f1 );
worldrenderer.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel, ( par3 + par5 ) * f, ( par4 + 0 ) * f1 );
worldrenderer.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, ( par3 + 0 ) * f, ( par4 + 0 ) * f1 );

View File

@ -138,15 +138,14 @@ public class GuiCraftConfirm extends AEBaseGui
this.start.enabled = !( this.ccc.noCPU || this.isSimulation() );
this.selectCPU.enabled = !this.isSimulation();
int x = 0;
int y = 0;
int gx = ( this.width - this.xSize ) / 2;
int gy = ( this.height - this.ySize ) / 2;
int offY = 23;
this.tooltip = -1;
int offY = 23;
int y = 0;
int x = 0;
for( int z = 0; z <= 4 * 5; z++ )
{
int minX = gx + 9 + x * 67;
@ -269,7 +268,6 @@ public class GuiCraftConfirm extends AEBaseGui
int negY = ( ( lines - 1 ) * 5 ) / 2;
int downY = 0;
boolean red = false;
if( stored != null && stored.getStackSize() > 0 )
{
@ -295,6 +293,7 @@ public class GuiCraftConfirm extends AEBaseGui
downY += 5;
}
boolean red = false;
if( missingStack != null && missingStack.getStackSize() > 0 )
{
String str = Long.toString( missingStack.getStackSize() );

View File

@ -154,15 +154,14 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
this.cancel.enabled = !this.visual.isEmpty();
int x = 0;
int y = 0;
final int gx = ( this.width - this.xSize ) / 2;
final int gy = ( this.height - this.ySize ) / 2;
final int offY = 23;
this.tooltip = -1;
final int offY = 23;
int y = 0;
int x = 0;
for( int z = 0; z <= 4 * 5; z++ )
{
int minX = gx + 9 + x * 67;
@ -192,7 +191,6 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
@Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
{
final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() );
if( this.craftingCpu.eta > 0 && !this.visual.isEmpty() )
@ -216,6 +214,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int offY = 23;
final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ )
{
IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
@ -229,18 +228,18 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
final IAEItemStack pendingStack = this.pending.findPrecise( refStack );
int lines = 0;
boolean active = false;
boolean scheduled = false;
if( stored != null && stored.getStackSize() > 0 )
{
lines++;
}
boolean active = false;
if( activeStack != null && activeStack.getStackSize() > 0 )
{
lines++;
active = true;
}
boolean scheduled = false;
if( pendingStack != null && pendingStack.getStackSize() > 0 )
{
lines++;

View File

@ -65,8 +65,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
if( s != null )
{
PacketInventoryAction p;
p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p );
}
}

View File

@ -99,7 +99,6 @@ public class GuiInterfaceTerminal extends AEBaseGui
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
int offset = 17;
int ex = this.myScrollBar.getCurrentScroll();
Iterator<Object> o = this.inventorySlots.inventorySlots.iterator();
@ -111,6 +110,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
}
}
int offset = 17;
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
{
Object lineObj = this.lines.get( ex + x );

View File

@ -393,9 +393,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
@Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
{
int x_width = 197;
this.bindTexture( this.getBackground() );
int x_width = 197;
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
if( this.viewCell || ( this instanceof GuiSecurity ) )

View File

@ -92,14 +92,14 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
@Override
public void drawScreen( int mouseX, int mouseY, float btn )
{
int x = 0;
int y = 0;
int gx = ( this.width - this.xSize ) / 2;
int gy = ( this.height - this.ySize ) / 2;
this.tooltip = -1;
int y = 0;
int x = 0;
for( int z = 0; z <= 4 * 5; z++ )
{
int minX = gx + 14 + x * 31;

View File

@ -59,9 +59,6 @@ public class GuiVibrationChamber extends AEBaseGui
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
int k = 25;
int l = -15;
this.pb.setFullMsg( this.cvc.aePerTick * this.cvc.getCurrentProgress() / 100 + " AE/t" );
if( this.cvc.getCurrentProgress() > 0 )
@ -69,6 +66,8 @@ public class GuiVibrationChamber extends AEBaseGui
int i1 = this.cvc.getCurrentProgress();
this.bindTexture( "guis/vibchamber.png" );
GL11.glColor3f( 1, 1, 1 );
int l = -15;
int k = 25;
this.drawTexturedModalRect( k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2 );
}
}

View File

@ -332,10 +332,9 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
public void renderInvBlock( EnumSet<AEPartLocation> sides, B block, ItemStack item, int color, ModelGenerator tess )
{
int meta = 0;
if( block != null && block.hasSubtypes() && item != null )
{
meta = item.getItemDamage();
int meta = item.getItemDamage();
}
IAESprite[] icons = tess.getIcon( item == null ? block.getDefaultState() : block.getStateFromMeta( item.getMetadata() ) );
@ -408,15 +407,13 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
public void preRenderInWorld( B block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
{
EnumFacing forward = EnumFacing.SOUTH;
EnumFacing up = EnumFacing.UP;
BlockRenderInfo info = block.getRendererInstance();
IOrientable te = this.getOrientable( block, world, pos );
if( te != null )
{
forward = te.getForward() ;
up = te.getUp() ;
EnumFacing forward = te.getForward();
EnumFacing up = te.getUp();
renderer.uvRotateBottom = info.getTexture( AEPartLocation.DOWN ).setFlip( getOrientation( EnumFacing.DOWN, forward, up ) );
renderer.uvRotateTop = info.getTexture( AEPartLocation.UP ).setFlip( getOrientation( EnumFacing.UP, forward, up ) );
@ -501,9 +498,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
double offsetY = 0.0;
double offsetZ = 0.0;
double layerAX = 0.0;
double layerAY = 0.0;
double layerAZ = 0.0;
double layerBX = 0.0;
double layerBY = 0.0;
double layerBZ = 0.0;
@ -560,6 +555,8 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
offsetY += pos.getY();
offsetZ += pos.getZ();
double layerBX = 0.0;
double layerAY = 0.0;
this.renderFace(orientation, tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0, 1.0,
@ -672,11 +669,11 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
public void renderTile( B block, T tile, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderer )
{
AEPartLocation forward = AEPartLocation.SOUTH;
AEPartLocation up = AEPartLocation.UP;
renderer.uvRotateBottom = renderer.uvRotateTop = renderer.uvRotateEast = renderer.uvRotateWest = renderer.uvRotateNorth = renderer.uvRotateSouth = 0;
AEPartLocation up = AEPartLocation.UP;
AEPartLocation forward = AEPartLocation.SOUTH;
this.applyTESRRotation( x, y, z, forward.getFacing(), up.getFacing() );
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );

View File

@ -308,7 +308,6 @@ public final class BusRenderHelper implements IPartRenderHelper
{
EnumFacing forward = this.az;
EnumFacing up = this.ay;
EnumFacing west = null;
if( forward == null || up == null )
{
@ -319,6 +318,7 @@ public final class BusRenderHelper implements IPartRenderHelper
int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
EnumFacing west = null;
for( EnumFacing dx : EnumFacing.VALUES )
{
if( dx.getFrontOffsetX() == west_x && dx.getFrontOffsetY() == west_y && dx.getFrontOffsetZ() == west_z )

View File

@ -128,9 +128,9 @@ public class CableRenderHelper
IFacadePart fPart = iFacadeContainer.getFacade( s );
if( fPart != null )
{
AEAxisAlignedBB b = null;
fPart.setThinFacades( useThinFacades );
AxisAlignedBB pb = fPart.getPrimaryBox();
AEAxisAlignedBB b = null;
for( AxisAlignedBB bb : boxes )
{
if( bb.intersectsWith( pb ) )

View File

@ -59,7 +59,6 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
@Override
public boolean renderInWorld( B blk, IBlockAccess w, BlockPos pos, ModelGenerator renderer )
{
IAESprite theIcon = null;
boolean formed = false;
boolean emitsLight = false;
@ -71,7 +70,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
}
boolean isMonitor = blk.getClass() == BlockCraftingMonitor.class;
theIcon = renderer.getIcon( w.getBlockState( pos ) )[EnumFacing.SOUTH.ordinal()];// blk.getIcon( AEPartLocation.SOUTH.ordinal(), meta | ( formed ? 8 : 0 ) );
IAESprite theIcon = renderer.getIcon( w.getBlockState( pos ) )[EnumFacing.SOUTH.ordinal()];
int meta = 1;
for( Block craftingBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
@ -299,11 +298,10 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
i.setTexture( ExtraBlockTextures.BlockCraftingUnitRingLong.getIcon() );
}
double width = 3.0 / 16.0;
AEPartLocation dir = AEPartLocation.fromFacing( a );
if( !( i.getBound( dir ) < 0.001 || i.getBound( dir ) > 15.999 ) )
{
double width = 3.0 / 16.0;
switch( a )
{
case DOWN:

View File

@ -63,11 +63,8 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
IAESprite[] icoSet = { imb.getIcon( EnumFacing.UP, imb.getDefaultState() ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
int lumen = 14 << 20 | 14 << 4;
int brightness = imb.getMixedBrightnessForBlock( world, pos );
double offsetConstant = 0.001;
EnumSet<EnumFacing> validSides = EnumSet.noneOf( EnumFacing.class );
for( EnumFacing side : EnumFacing.VALUES )
@ -78,6 +75,8 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
}
}
double offsetConstant = 0.001;
int lumen = 14 << 20 | 14 << 4;
for( Splotch s : tp.getDots() )
{
if( !validSides.contains( s.side ) )

View File

@ -85,7 +85,6 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
this.selectFace( renderer, west, up, forward, 5, 16 - 5, 9, 12 );
int offsetU = -4;
int offsetV = 8;
if( stat == 0 )
{
@ -96,6 +95,7 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
renderer.setBrightness( b );
renderer.setColorOpaque_I( 0xffffff );
int offsetU = -4;
FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
if( forward == EnumFacing.EAST && ( up == EnumFacing.NORTH || up == EnumFacing.SOUTH ) )
{

View File

@ -117,8 +117,8 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
renderMax = 12.1f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
int bn = 15;
renderer.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
int bn = 15;
renderer.setBrightness( bn << 20 | bn << 4 );
for( EnumFacing side : EnumFacing.VALUES )
{
@ -145,8 +145,8 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
renderMax = 16.01f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
int bn = 15;
renderer.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
int bn = 15;
renderer.setBrightness( bn << 20 | bn << 4 );
for( EnumFacing side : EnumFacing.VALUES )
{

View File

@ -46,18 +46,12 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
@Override
public void renderInventory( AEBaseBlock blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
{
float Point2 = 6.0f / 16.0f;
float Point3 = 7.0f / 16.0f;
float Point13 = 10.0f / 16.0f;
float Point12 = 9.0f / 16.0f;
float singlePixel = 1.0f / 16.0f;
float renderBottom = 5.0f / 16.0f;
float renderTop = 10.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float top = 8.0f / 16.0f;
float xOff = 0.0f;
float yOff = 0.0f;
float zOff = 0.0f;
@ -65,6 +59,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
float singlePixel = 1.0f / 16.0f;
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
@ -75,6 +70,10 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
renderer.renderAllFaces = true;
float top = 8.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float Point13 = 10.0f / 16.0f;
float Point2 = 6.0f / 16.0f;
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
@ -97,23 +96,10 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
{
IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, pos );
float Point2 = 6.0f / 16.0f;
float Point3 = 7.0f / 16.0f;
float Point13 = 10.0f / 16.0f;
float Point12 = 9.0f / 16.0f;
float singlePixel = 1.0f / 16.0f;
float renderBottom = 5.0f / 16.0f;
float renderTop = 10.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float top = 8.0f / 16.0f;
float xOff = 0.0f;
float yOff = 0.0f;
float zOff = 0.0f;
renderer.renderAllFaces = true;
float zOff = 0.0f;
float yOff = 0.0f;
float xOff = 0.0f;
if( te != null )
{
AEPartLocation forward = AEPartLocation.fromFacing( te.getUp() );
@ -122,10 +108,15 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
zOff = forward.zOffset * -( 4.0f / 16.0f );
}
float renderTop = 10.0f / 16.0f;
float renderBottom = 5.0f / 16.0f;
float Point12 = 9.0f / 16.0f;
float Point3 = 7.0f / 16.0f;
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
super.renderInWorld( block, world, pos, renderer );
int r = ( pos.getX() + pos.getY() + pos.getZ() ) % 2;
float singlePixel = 1.0f / 16.0f;
if( r == 0 )
{
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
@ -145,6 +136,10 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
float top = 8.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float Point13 = 10.0f / 16.0f;
float Point2 = 6.0f / 16.0f;
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
boolean out = renderer.renderStandardBlock( block, pos );

View File

@ -59,10 +59,10 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
TileSpatialPylon sp = imb.getTileEntity( world, pos );
int displayBits = ( sp == null ) ? 0 : sp.getDisplayBits();
EnumFacing ori = null;//AEPartLocation.INTERNAL;
if( displayBits != 0 )
{
EnumFacing ori = null;//AEPartLocation.INTERNAL;
if( ( displayBits & TileSpatialPylon.DISPLAY_Z ) == TileSpatialPylon.DISPLAY_X )
{
ori = EnumFacing.EAST;

View File

@ -84,7 +84,6 @@ public class CraftingFx extends EntityBreakingFX
float offX = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * partialTick );
float offY = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTick );
float offZ = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTick );
float f14 = 1.0F;
int blkX = MathHelper.floor_double( offX );
int blkY = MathHelper.floor_double( offY );
@ -96,6 +95,7 @@ public class CraftingFx extends EntityBreakingFX
offZ -= interpPosZ;
// AELog.info( "" + partialTick );
float f14 = 1.0F;
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale, f7, f9 );
par1Tessellator.addVertexWithUV( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale, f7, f8 );

View File

@ -78,7 +78,6 @@ public class EnergyFx extends EntityBreakingFX
float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
float f14 = 1.0F;
int blkX = MathHelper.floor_double( this.posX );
int blkY = MathHelper.floor_double( this.posY );
@ -86,6 +85,7 @@ public class EnergyFx extends EntityBreakingFX
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
float f14 = 1.0F;
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, f7, f9 );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10, f7, f8 );

View File

@ -474,7 +474,6 @@ public abstract class AEBaseContainer extends Container
return null;
}
ItemStack tis = null;
AppEngSlot clickSlot = (AppEngSlot) this.inventorySlots.get( idx ); // require AE SLots!
if( clickSlot instanceof SlotDisabled || clickSlot instanceof SlotInaccessible )
@ -483,7 +482,7 @@ public abstract class AEBaseContainer extends Container
}
if( clickSlot != null && clickSlot.getHasStack() )
{
tis = clickSlot.getStack();
ItemStack tis = clickSlot.getStack();
if( tis == null )
{

View File

@ -91,9 +91,6 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
@Override
protected void setupConfig()
{
int x = 8;
int y = 29;
int offset = 0;
IInventory cell = this.upgradeable.getInventoryByName( "cell" );
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, this.invPlayer ) );
@ -102,6 +99,9 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
IInventory upgradeInventory = new Upgrades();
// null, 3 * 8 );
int offset = 0;
int y = 29;
int x = 8;
for( int w = 0; w < 7; w++ )
{
for( int z = 0; z < 9; z++ )

View File

@ -216,7 +216,6 @@ public class ContainerCraftConfirm extends AEBaseContainer
for( IAEItemStack out : plan )
{
IAEItemStack m = null;
IAEItemStack o = out.copy();
o.reset();
@ -229,6 +228,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
IStorageGrid sg = this.getGrid().getCache( IStorageGrid.class );
IMEInventory<IAEItemStack> items = sg.getItemInventory();
IAEItemStack m = null;
if( c != null && this.result.isSimulation() )
{
m = o.copy();

View File

@ -152,7 +152,6 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
if( ( s == this.top && bot != null ) || ( s == this.bottom && top != null ) )
{
boolean isValid = false;
ItemStack otherSlot = null;
if( s == this.top )
{
@ -171,6 +170,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
}
// everything else
boolean isValid = false;
for( IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
{
if( Platform.isSameItemPrecise( recipe.getTopOptional().orNull(), otherSlot ) )

View File

@ -74,8 +74,6 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
@Override
protected void setupConfig()
{
int x = 80 + 44;
int y = 40;
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
if( this.availableUpgrades() > 0 )
@ -96,6 +94,8 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
}
IInventory inv = this.upgradeable.getInventoryByName( "config" );
int y = 40;
int x = 80 + 44;
this.addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
}

View File

@ -106,10 +106,9 @@ public class ContainerNetworkStatus extends AEBaseContainer
this.maxPower = (long) ( 100.0 * eg.getMaxStoredPower() );
}
PacketMEInventoryUpdate piu;
try
{
piu = new PacketMEInventoryUpdate();
PacketMEInventoryUpdate piu = new PacketMEInventoryUpdate();
for( Class<? extends IGridHost> machineClass : this.network.getMachinesClasses() )
{

View File

@ -133,11 +133,11 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
protected void setupConfig()
{
int x = 80;
int y = 40;
this.setupUpgrades();
IInventory inv = this.upgradeable.getInventoryByName( "config" );
int y = 40;
int x = 80;
this.addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
if( this.supportCapacity() )

View File

@ -113,14 +113,14 @@ public final class AEConfig extends Configuration implements IConfigurableObject
FMLCommonHandler.instance().bus().register( this );
final double DEFAULT_IC2_EXCHANGE = 2.0;
final double DEFAULT_RTC_EXCHANGE = 1.0 / 11256.0;
final double DEFAULT_RF_EXCHANGE = 0.5;
final double DEFAULT_MEKANISM_EXCHANGE = 0.2;
PowerUnits.MK.conversionRatio = this.get( "PowerRatios", "Mekanism", DEFAULT_MEKANISM_EXCHANGE ).getDouble( DEFAULT_MEKANISM_EXCHANGE );
final double DEFAULT_IC2_EXCHANGE = 2.0;
PowerUnits.EU.conversionRatio = this.get( "PowerRatios", "IC2", DEFAULT_IC2_EXCHANGE ).getDouble( DEFAULT_IC2_EXCHANGE );
final double DEFAULT_RTC_EXCHANGE = 1.0 / 11256.0;
PowerUnits.WA.conversionRatio = this.get( "PowerRatios", "RotaryCraft", DEFAULT_RTC_EXCHANGE ).getDouble( DEFAULT_RTC_EXCHANGE );
final double DEFAULT_RF_EXCHANGE = 0.5;
PowerUnits.RF.conversionRatio = this.get( "PowerRatios", "ThermalExpansion", DEFAULT_RF_EXCHANGE ).getDouble( DEFAULT_RF_EXCHANGE );
double usageEffective = this.get( "PowerRatios", "UsageMultiplier", 1.0 ).getDouble( 1.0 );

View File

@ -238,12 +238,11 @@ public class ApiPart implements IPartHelper
public ClassNode getReader( String name )
{
ClassReader cr;
String path = '/' + name.replace( ".", "/" ) + ".class";
InputStream is = this.getClass().getResourceAsStream( path );
try
{
cr = new ClassReader( is );
ClassReader cr = new ClassReader( is );
ClassNode cn = new ClassNode();
cr.accept( cn, ClassReader.EXPAND_FRAMES );

View File

@ -54,10 +54,9 @@ public final class GridCacheRegistry implements IGridCacheRegistry
for( Class<? extends IGridCache> iface : this.caches.keySet() )
{
Constructor<? extends IGridCache> c;
try
{
c = this.caches.get( iface ).getConstructor( IGrid.class );
Constructor<? extends IGridCache> c = this.caches.get( iface ).getConstructor( IGrid.class );
map.put( iface, c.newInstance( g ) );
}
catch( NoSuchMethodException e )

View File

@ -544,7 +544,6 @@ public enum GuiBridge implements IGuiHandler
{
if( te instanceof IActionHost && this.requiredPermission != null )
{
boolean requirePower = false;
IGridNode gn = ( (IActionHost) te ).getActionableNode();
if( gn != null )
@ -552,6 +551,7 @@ public enum GuiBridge implements IGuiHandler
IGrid g = gn.getGrid();
if( g != null )
{
boolean requirePower = false;
if( requirePower )
{
IEnergyGrid eg = g.getCache( IEnergyGrid.class );

View File

@ -45,11 +45,10 @@ public class AppEngClientPacketHandler extends AppEngPacketHandlerBase implement
final EntityPlayer player )
{
ByteBuf stream = packet.payload();
int packetType = -1;
try
{
packetType = stream.readInt();
int packetType = stream.readInt();
AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
PacketCallState callState =

View File

@ -91,10 +91,9 @@ public class PacketCraftRequest extends AppEngPacket
return;
}
Future<ICraftingJob> futureJob = null;
cca.whatToMake.setStackSize( this.amount );
Future<ICraftingJob> futureJob = null;
try
{
ICraftingGrid cg = g.getCache( ICraftingGrid.class );

View File

@ -107,13 +107,13 @@ public class ToolDebugCard extends AEBaseItem
IPathingGrid pg = g.getCache( IPathingGrid.class );
if( pg.getControllerState() == ControllerState.CONTROLLER_ONLINE )
{
int length = 0;
Set<IGridNode> next = new HashSet<IGridNode>();
next.add( node );
int maxLength = 10000;
int length = 0;
outer:
while( !next.isEmpty() )
{

View File

@ -63,10 +63,10 @@ public class ToolEraser extends AEBaseItem
IBlockState state = world.getBlockState( pos );
int blocks = 0;
List<BlockPos> next = new LinkedList<BlockPos>();
next.add( pos );
int blocks = 0;
while( blocks < BLOCK_ERASE_LIMIT && !next.isEmpty() )
{
List<BlockPos> c = next;

View File

@ -177,11 +177,9 @@ public class FacadePart implements IFacadePart, IBoxProvider
}
}
int color = 0xffffff;
try
{
color = ib.getColorFromItemStack( randomItem, 0 );
int color = ib.getColorFromItemStack( randomItem, 0 );
}
catch( Throwable ignored )
{

View File

@ -634,10 +634,10 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
private boolean usePlan( int x, IAEItemStack itemStack )
{
boolean changed = false;
InventoryAdaptor adaptor = this.getAdaptor( x );
this.isWorking = true;
boolean changed = false;
try
{
this.destination = this.gridProxy.getStorage().getItemInventory();

View File

@ -98,10 +98,10 @@ public class MultiCraftingTracker
}
else if( craftingJob != null )
{
ICraftingJob job = null;
try
{
ICraftingJob job = null;
if( craftingJob.isDone() )
{
job = craftingJob.get();

View File

@ -165,8 +165,8 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
throw new IllegalStateException( "No pattern here!" );
}
int offset = 0;
this.condensedInputs = new IAEItemStack[tmpInputs.size()];
int offset = 0;
for( IAEItemStack io : tmpInputs.values() )
{
this.condensedInputs[offset] = io;

View File

@ -92,12 +92,11 @@ public class ItemPaintBall extends AEBaseItem
int r = ( colorValue >> 16 ) & 0xff;
int g = ( colorValue >> 8 ) & 0xff;
int b = ( colorValue ) & 0xff;
int full = (int) ( 255 * 0.3 );
float fail = 0.7f;
if( stack.getItemDamage() >= 20 )
{
float fail = 0.7f;
int full = (int) ( 255 * 0.3 );
return (int)( full + r * fail ) << 16 | (int)( full + g * fail ) << 8 | (int)( full + b * fail ) | 0xff << 24;
}
else

View File

@ -159,7 +159,6 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
int targetZ = max.z - min.z - 1;
int maxSize = this.getMaxStoredDim( is );
int floorBuffer = 64;
World destination = this.getWorld( is );
if( ( scale.x == 0 && scale.y == 0 && scale.z == 0 ) || ( scale.x == targetX && scale.y == targetY && scale.z == targetZ ) )
@ -171,6 +170,7 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
destination = this.createNewWorld( is );
}
int floorBuffer = 64;
StorageHelper.getInstance().swapRegions( w, destination, min.x + 1, min.y + 1, min.z + 1, 1, floorBuffer + 1, 1, targetX - 1, targetY - 1, targetZ - 1 );
this.setStoredSize( is, targetX, targetY, targetZ );

View File

@ -133,7 +133,6 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
float hitZ )
{
Block blk = w.getBlockState( pos ).getBlock();
double powerPerUse = 100;
ItemStack paintBall = this.getColor( is );
@ -157,6 +156,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
return false;
}
double powerPerUse = 100;
if( paintBall != null && paintBall.getItem() instanceof ItemSnowball )
{
TileEntity te = w.getTileEntity( pos );

View File

@ -204,9 +204,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
Entity entity = null;
List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
double closest = 9999999.0D;
int l;
for( l = 0; l < list.size(); ++l )
for( int l = 0; l < list.size(); ++l )
{
Entity entity1 = (Entity) list.get( l );
@ -323,9 +322,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
Entity entity = null;
List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
double closest = 9999999.0D;
int l;
for( l = 0; l < list.size(); ++l )
for( int l = 0; l < list.size(); ++l )
{
Entity entity1 = (Entity) list.get( l );

View File

@ -307,9 +307,9 @@ public class PathGridCache implements IPathingGrid
private int calculateRequiredChannels()
{
int depth = 0;
this.semiOpen.clear();
int depth = 0;
for( IGridNode nodes : this.requireChannels )
{
if( !this.semiOpen.contains( nodes ) )

View File

@ -64,13 +64,6 @@ public class SpatialPylonCache implements ISpatialCache
public void reset( IGrid grid )
{
int reqX = 0;
int reqY = 0;
int reqZ = 0;
int requirePylonBlocks = 1;
double minPower = 0;
double maxPower = 0;
this.clusters = new HashMap<SpatialPylonCluster, SpatialPylonCluster>();
this.ioPorts = new LinkedList<TileSpatialIOPort>();
@ -120,6 +113,8 @@ public class SpatialPylonCache implements ISpatialCache
this.captureMax.z = Math.max( this.captureMax.z, cl.max.z );
}
double maxPower = 0;
double minPower = 0;
if( this.hasRegion() )
{
this.isValid = this.captureMax.x - this.captureMin.x > 1 && this.captureMax.y - this.captureMin.y > 1 && this.captureMax.z - this.captureMin.z > 1;
@ -149,10 +144,10 @@ public class SpatialPylonCache implements ISpatialCache
}
}
reqX = this.captureMax.x - this.captureMin.x;
reqY = this.captureMax.y - this.captureMin.y;
reqZ = this.captureMax.z - this.captureMin.z;
requirePylonBlocks = Math.max( 6, ( ( reqX * reqZ + reqX * reqY + reqY * reqZ ) * 3 ) / 8 );
int reqX = this.captureMax.x - this.captureMin.x;
int reqY = this.captureMax.y - this.captureMin.y;
int reqZ = this.captureMax.z - this.captureMin.z;
int requirePylonBlocks = Math.max( 6, ( ( reqX * reqZ + reqX * reqY + reqY * reqZ ) * 3 ) / 8 );
this.efficiency = (double) pylonBlocks / (double) requirePylonBlocks;

View File

@ -1290,12 +1290,12 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
this.lastTime = System.nanoTime();
this.elapsedTime = 0;
int itemCount = 0;
final IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
this.getListOfItem( list, CraftingItemList.ACTIVE );
this.getListOfItem( list, CraftingItemList.PENDING );
int itemCount = 0;
for( IAEItemStack ge : list )
{
itemCount += ge.getStackSize();

View File

@ -129,9 +129,8 @@ public class QuantumCalculator extends MBCalculator
{
TileQuantumBridge te = (TileQuantumBridge) w.getTileEntity( new BlockPos( x, y, z ) );
byte flags;
num++;
byte flags;
if( num == 5 )
{
flags = num;

View File

@ -77,9 +77,8 @@ public class QuantumCluster implements ILocatable, IAECluster
@Override
public void updateStatus( boolean updateGrid )
{
long qe;
qe = this.center.getQEFrequency();
long qe = this.center.getQEFrequency();
if( this.thisSide != qe && this.thisSide != -qe )
{

View File

@ -127,7 +127,6 @@ public class MEIInventoryWrapper implements IMEInventory<IAEItemStack>
@Override
public IAEItemStack extractItems( IAEItemStack request, Actionable mode, BaseActionSource src )
{
ItemStack Gathered = null;
ItemStack Req = request.getItemStack();
int request_stackSize = Req.stackSize;
@ -139,6 +138,7 @@ public class MEIInventoryWrapper implements IMEInventory<IAEItemStack>
Req.stackSize = request_stackSize;
ItemStack Gathered = null;
if( this.adaptor != null )
{
Gathered = this.adaptor.removeItems( Req.stackSize, Req, null );

View File

@ -140,12 +140,12 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>
public TickRateModulation onTick()
{
boolean changed = false;
LinkedList<IAEItemStack> changes = new LinkedList<IAEItemStack>();
int high = 0;
this.list.resetStatus();
int high = 0;
boolean changed = false;
for( ItemSlot is : this.adaptor )
{
CachedItemStack old = this.memory.get( is.slot );

View File

@ -166,10 +166,9 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
IGrid gn = n.getGrid();
if( gn != this.security.myGrid )
{
int playerID = -1;
ISecurityGrid sg = gn.getCache( ISecurityGrid.class );
playerID = sg.getOwner();
int playerID = sg.getOwner();
if( !this.security.hasPermission( playerID, permission ) )
{

View File

@ -927,11 +927,10 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
for( int x = 0; x < 7; x++ )
{
ItemStack is = null;
IPart p = this.getPart( AEPartLocation.fromOrdinal( x ) );
if( p != null )
{
is = p.getItemStack( PartItemStack.Network );
ItemStack is = p.getItemStack( PartItemStack.Network );
data.writeShort( Item.getIdFromItem( is.getItem() ) );
data.writeShort( is.getItemDamage() );

View File

@ -160,9 +160,6 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
protected void renderStaticWithIcon( BlockPos opos, IPartRenderHelper rh, ModelGenerator renderer, IAESprite activeIcon )
{
int minX = 1;
int minY = 1;
int maxX = 15;
int maxY = 15;
final EnumFacing e = rh.getWorldX();
final EnumFacing u = rh.getWorldY();
@ -174,17 +171,20 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
{
minX = 0;
}
int maxX = 15;
if( this.isAnnihilationPlane( te.getWorld().getTileEntity( pos.offset( e ) ), this.side ) )
{
maxX = 16;
}
int minY = 1;
if( this.isAnnihilationPlane( te.getWorld().getTileEntity( pos.offset( u.getOpposite() ) ), this.side ) )
{
minY = 0;
}
int maxY = 15;
if( this.isAnnihilationPlane( te.getWorld().getTileEntity( pos.offset( e) ), this.side ) )
{
maxY = 16;

View File

@ -282,9 +282,6 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
public void renderStatic( BlockPos opos, IPartRenderHelper rh, ModelGenerator renderer )
{
int minX = 1;
int minY = 1;
int maxX = 15;
int maxY = 15;
EnumFacing e = rh.getWorldX();
EnumFacing u = rh.getWorldY();
@ -297,16 +294,19 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
minX = 0;
}
int maxX = 15;
if( this.isTransitionPlane( te.getWorld().getTileEntity( pos.offset( e ) ), this.side ) )
{
maxX = 16;
}
int minY = 1;
if( this.isTransitionPlane( te.getWorld().getTileEntity( pos.offset( u.getOpposite() ) ), this.side ) )
{
minY = 0;
}
int maxY = 15;
if( this.isTransitionPlane( te.getWorld().getTileEntity( pos.offset( u ) ), this.side ) )
{
maxY = 16;

View File

@ -286,8 +286,6 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
private int calculateMaximumAmountToImport( InventoryAdaptor myAdaptor, IAEItemStack whatToImport, IMEMonitor<IAEItemStack> inv, FuzzyMode fzMode )
{
final int toSend = Math.min( this.itemToSend, 64 );
final ItemStack simResult;
final IAEItemStack itemAmountNotStorable;
final ItemStack itemStackToImport;
if( whatToImport == null )
@ -299,6 +297,8 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
itemStackToImport = whatToImport.getItemStack();
}
final IAEItemStack itemAmountNotStorable;
final ItemStack simResult;
if( this.getInstalledUpgrades( Upgrades.FUZZY ) > 0 )
{
simResult = myAdaptor.simulateSimilarRemove( toSend, itemStackToImport, fzMode, this.configDestination( inv ) );

View File

@ -430,9 +430,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
baseY += 7.0 / 16.0;
double par10 = 0;
// double par11 = 0;
double Zero = 0;
/*
* double d5 = (double)TextureAtlasSprite.func_94209_e(); double d6 = (double)TextureAtlasSprite.func_94206_g(); double d7 =
@ -472,9 +470,6 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
double var38 = baseX + 0.5D;
double var40 = baseZ - 0.5D;
double var42 = baseZ + 0.5D;
double var44 = 0.0625D;
double var422 = 0.1915D + 1.0 / 16.0;
double TorchLen = 0.625D;
double toff = 0.0d;
@ -490,12 +485,17 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
}
EnumFacing t = EnumFacing.UP;
double TorchLen = 0.625D;
double var44 = 0.0625D;
double Zero = 0;
double par10 = 0;
this.addVertexWithUV(t,renderer, baseX + Zero * ( 1.0D - TorchLen ) - var44, baseY + TorchLen - toff, baseZ + par10 * ( 1.0D - TorchLen ) - var44, var20, var22 );
this.addVertexWithUV(t,renderer, baseX + Zero * ( 1.0D - TorchLen ) - var44, baseY + TorchLen - toff, baseZ + par10 * ( 1.0D - TorchLen ) + var44, var20, var26 );
this.addVertexWithUV(t,renderer, baseX + Zero * ( 1.0D - TorchLen ) + var44, baseY + TorchLen - toff, baseZ + par10 * ( 1.0D - TorchLen ) + var44, var24, var26 );
this.addVertexWithUV(t,renderer, baseX + Zero * ( 1.0D - TorchLen ) + var44, baseY + TorchLen - toff, baseZ + par10 * ( 1.0D - TorchLen ) - var44, var24, var22 );
double var422 = 0.1915D + 1.0 / 16.0;
this.addVertexWithUV(t,renderer, baseX + Zero * ( 1.0D - TorchLen ) + var44, baseY + var422, baseZ + par10 * ( 1.0D - TorchLen ) - var44, var24b, var22b );
this.addVertexWithUV(t,renderer, baseX + Zero * ( 1.0D - TorchLen ) + var44, baseY + var422, baseZ + par10 * ( 1.0D - TorchLen ) + var44, var24b, var26b );
this.addVertexWithUV(t,renderer, baseX + Zero * ( 1.0D - TorchLen ) - var44, baseY + var422, baseZ + par10 * ( 1.0D - TorchLen ) + var44, var20b, var26b );

View File

@ -465,10 +465,10 @@ public class PartCable extends AEBasePart implements IPartCable
if( Platform.isServer() )
{
IGridNode node = this.getGridNode();
int howMany = 0;
if( node != null )
{
int howMany = 0;
for( IGridConnection gc : node.getConnections() )
{
howMany = Math.max( gc.getUsedChannels(), howMany );
@ -816,11 +816,11 @@ public class PartCable extends AEBasePart implements IPartCable
TileEntity te = this.tile.getWorld().getTileEntity( pos.offset( of.getFacing() ) );
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = this.getCableColor();
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of.getFacing() ) ) );
boolean isGlass = false;
if( ghh != null && partHost != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && partHost.getPart( of.getOpposite() ) == null && partHost.getColor() != AEColor.Transparent )
{
isGlass = true;

View File

@ -364,7 +364,6 @@ public class PartDenseCable extends PartCable
TileEntity te = this.tile.getWorld().getTileEntity( pos.offset( of.getFacing() ) );
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = this.getCableColor();
/*
* ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getPart(
@ -434,6 +433,7 @@ public class PartDenseCable extends PartCable
rh.renderBlock( pos, renderer );
rh.setFacesToRender( EnumSet.allOf( EnumFacing.class ) );
boolean isGlass = false;
if( !isGlass )
{
this.setSmartConnectionRotations( of, renderer );

View File

@ -136,9 +136,9 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
}
int available = resource.amount;
int used = 0;
i = list.iterator();
int used = 0;
while( i.hasNext() )
{
PartP2PLiquids l = i.next();

View File

@ -458,10 +458,9 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
}
else
{
IEnergyGrid eg;
try
{
eg = this.gridProxy.getEnergy();
IEnergyGrid eg = this.gridProxy.getEnergy();
IEnergySource src = this;
// Base 1, increase by 1 for each card

View File

@ -100,10 +100,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
{
if( this.cb.requiresDynamicRender )
{
TileCableBus tcb;
try
{
tcb = (TileCableBus) BlockCableBus.tesrTile.newInstance();
TileCableBus tcb = (TileCableBus) BlockCableBus.tesrTile.newInstance();
tcb.copyFrom( this );
this.getWorld().setTileEntity( pos, tcb );
}

View File

@ -30,10 +30,9 @@ public class TileCableBusTESR extends TileCableBus
{
if( !this.cb.requiresDynamicRender )
{
TileCableBus tcb;
try
{
tcb = (TileCableBus) BlockCableBus.noTesrTile.newInstance();
TileCableBus tcb = (TileCableBus) BlockCableBus.noTesrTile.newInstance();
tcb.copyFrom( this );
this.getWorld().setTileEntity( pos, tcb );
}

View File

@ -343,10 +343,9 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
{
double stash = 0.0;
IEnergyGrid eg;
try
{
eg = this.gridProxy.getEnergy();
IEnergyGrid eg = this.gridProxy.getEnergy();
stash = eg.extractAEPower( amt, mode, PowerMultiplier.ONE );
if( stash >= amt )
{
@ -955,7 +954,6 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
{
if( TileChest.this.getTile() instanceof IActionHost && requiredPermission != null )
{
boolean requirePower = false;
IGridNode gn = ( (IActionHost) TileChest.this.getTile() ).getActionableNode();
if( gn != null )
@ -963,6 +961,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
IGrid g = gn.getGrid();
if( g != null )
{
boolean requirePower = false;
if( requirePower )
{
IEnergyGrid eg = g.getCache( IEnergyGrid.class );

View File

@ -205,7 +205,6 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
private void recalculateDisplay()
{
int oldState = 0;
boolean currentActive = this.gridProxy.isActive();
if( currentActive )
@ -235,6 +234,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
this.state |= ( this.getCellStatus( x ) << ( 3 * x ) );
}
int oldState = 0;
if( oldState != this.state )
{
this.markForUpdate();

View File

@ -170,7 +170,6 @@ public final class ASMIntegration implements IClassTransformer
}
String iFace = null;
String iName = null;
if( an.values.get( 0 ).equals( "iface" ) )
{
@ -181,6 +180,7 @@ public final class ASMIntegration implements IClassTransformer
iFace = (String) an.values.get( 3 );
}
String iName = null;
if( an.values.get( 0 ).equals( "iname" ) )
{
iName = ( (String[]) an.values.get( 1 ) )[1];

View File

@ -187,8 +187,6 @@ public class Platform
PowerUnits displayUnits = AEConfig.instance.selectedPowerUnit();
p = PowerUnits.AE.convertTo( displayUnits, p );
int offset = 0;
String level = "";
String[] preFixes = { "k", "M", "G", "T", "P", "T", "P", "E", "Z", "Y" };
String unitName = displayUnits.name();
@ -202,6 +200,8 @@ public class Platform
unitName = "J";
}
String level = "";
int offset = 0;
while( p > 1000 && offset < preFixes.length )
{
p /= 1000;
@ -1524,9 +1524,8 @@ public class Platform
if( hitEntities )
{
List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
int l;
for( l = 0; l < list.size(); ++l )
for( int l = 0; l < list.size(); ++l )
{
Entity entity1 = (Entity) list.get( l );
@ -1786,7 +1785,6 @@ public class Platform
{
for( EnumFacing dir : EnumFacing.VALUES )
{
int offset = 0;
int[] sides = ( (ISidedInventory) target ).getSlotsForFace( dir );
@ -1795,6 +1793,7 @@ public class Platform
return 0;
}
int offset = 0;
for( int side : sides )
{
int c = ( side << ( offset % 8 ) ) ^ ( 1 << dir.ordinal() );

View File

@ -452,7 +452,6 @@ public final class MeteoritePlacer
public boolean spawnMeteorite( IMeteoriteWorld w, int x, int y, int z )
{
int validBlocks = 0;
if( !w.hasNoSky() )
{
@ -508,6 +507,7 @@ public final class MeteoritePlacer
}
}
int validBlocks = 0;
for( int i = x - 15; i < x + 15; i++ )
{
for( int j = y - 15; j < y + 15; j++ )