Puts everywhere brackets

This commit is contained in:
thatsIch
2015-04-29 02:30:53 +02:00
parent 23aa8fd72d
commit 64ed05a1b4
465 changed files with 6726 additions and 14 deletions
@@ -95,21 +95,27 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe
public final double injectAEPower( double amt, Actionable mode )
{
if( amt < 0.000001 )
{
return 0;
}
if( mode == Actionable.SIMULATE )
{
double fakeBattery = this.internalCurrentPower + amt;
if( fakeBattery > this.internalMaxPower )
{
return fakeBattery - this.internalMaxPower;
}
return 0;
}
else
{
if( this.internalCurrentPower < 0.01 && amt > 0.01 )
{
this.PowerEvent( PowerEventType.PROVIDE_POWER );
}
this.internalCurrentPower += amt;
if( this.internalCurrentPower > this.internalMaxPower )
@@ -163,7 +169,9 @@ public abstract class AERootPoweredTile extends AEBaseInvTile implements IAEPowe
if( mode == Actionable.SIMULATE )
{
if( this.internalCurrentPower > amt )
{
return amt;
}
return this.internalCurrentPower;
}
@@ -55,7 +55,9 @@ public abstract class MekJoules extends RedstoneFlux implements IStrictEnergyAcc
{
double demand = this.getExternalPowerDemand( PowerUnits.MK, Double.MAX_VALUE );
if( amount > demand )
{
amount = demand;
}
double overflow = this.injectExternalPower( PowerUnits.MK, amount );
return amount - overflow;
@@ -45,7 +45,9 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
public void Tick_RotaryCraft()
{
if( this.worldObj != null && !this.worldObj.isRemote && this.power > 0 )
{
this.injectExternalPower( PowerUnits.WA, this.power );
}
}
@Override
@@ -88,7 +90,9 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
public final void setPower( long p )
{
if( Platform.isClient() )
{
return;
}
this.power = p;
}
@@ -118,17 +122,29 @@ public abstract class RotaryCraft extends IC2 implements ShaftPowerReceiver
ForgeDirection side = ForgeDirection.UNKNOWN;
if( x == this.xCoord - 1 )
{
side = ForgeDirection.WEST;
}
else if( x == this.xCoord + 1 )
{
side = ForgeDirection.EAST;
}
else if( z == this.zCoord - 1 )
{
side = ForgeDirection.NORTH;
}
else if( z == this.zCoord + 1 )
{
side = ForgeDirection.SOUTH;
}
else if( y == this.yCoord - 1 )
{
side = ForgeDirection.DOWN;
}
else if( y == this.yCoord + 1 )
{
side = ForgeDirection.UP;
}
return this.getPowerSides().contains( side );
}