Puts everywhere brackets
This commit is contained in:
@@ -179,7 +179,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
public void markForUpdate()
|
||||
{
|
||||
if( this.worldObj == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int newLV = this.cb.getLightValue();
|
||||
if( newLV != this.oldLV )
|
||||
@@ -217,10 +219,14 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
if( this.cb.isEmpty() )
|
||||
{
|
||||
if( this.worldObj.getTileEntity( this.xCoord, this.yCoord, this.zCoord ) == this )
|
||||
{
|
||||
this.worldObj.func_147480_a( this.xCoord, this.yCoord, this.zCoord, true );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cb.addToWorld();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -330,7 +336,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
{
|
||||
IImmibisMicroblocks imb = (IImmibisMicroblocks) AppEng.instance.getIntegration( IntegrationType.ImmibisMicroblocks );
|
||||
if( imb != null && imb.leaveParts( this ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.getWorldObj().setBlock( this.xCoord, this.yCoord, this.zCoord, Platform.AIR );
|
||||
@@ -338,14 +346,18 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
||||
{
|
||||
for( AxisAlignedBB bx : this.getSelectedBoundingBoxesFromPool( w, x, y, z, e, false ) )
|
||||
{
|
||||
out.add( AxisAlignedBB.getBoundingBox( bx.minX, bx.minY, bx.minZ, bx.maxX, bx.maxY, bx.maxZ ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyNeighbors()
|
||||
{
|
||||
if( this.worldObj != null && this.worldObj.blockExists( this.xCoord, this.yCoord, this.zCoord ) && !CableBusContainer.isLoading() )
|
||||
{
|
||||
Platform.notifyBlocksOfNeighbors( this.worldObj, this.xCoord, this.yCoord, this.zCoord );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -85,9 +85,13 @@ public class TileController extends AENetworkPowerTile
|
||||
if( oldValid != this.isValid || force )
|
||||
{
|
||||
if( this.isValid )
|
||||
{
|
||||
this.gridProxy.setValidSides( EnumSet.allOf( ForgeDirection.class ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
|
||||
}
|
||||
}
|
||||
|
||||
this.updateMeta();
|
||||
@@ -96,7 +100,9 @@ public class TileController extends AENetworkPowerTile
|
||||
private void updateMeta()
|
||||
{
|
||||
if( !this.gridProxy.isReady() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int meta = 0;
|
||||
|
||||
@@ -107,7 +113,9 @@ public class TileController extends AENetworkPowerTile
|
||||
meta = 1;
|
||||
|
||||
if( this.gridProxy.getPath().getControllerState() == ControllerState.CONTROLLER_CONFLICT )
|
||||
{
|
||||
meta = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
@@ -139,7 +147,9 @@ public class TileController extends AENetworkPowerTile
|
||||
{
|
||||
double ret = this.gridProxy.getEnergy().injectPower( AEUnits, mode );
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
|
||||
@@ -89,7 +89,9 @@ public class TileEnergyAcceptor extends AENetworkPowerTile
|
||||
IEnergyGrid grid = this.gridProxy.getEnergy();
|
||||
double leftOver = grid.injectPower( newPower, mode );
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
return leftOver;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
|
||||
@@ -66,14 +66,20 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
private void changePowerLevel()
|
||||
{
|
||||
if( this.notLoaded() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
byte boundMetadata = (byte) ( 8.0 * ( this.internalCurrentPower / this.internalMaxPower ) );
|
||||
|
||||
if( boundMetadata > 7 )
|
||||
{
|
||||
boundMetadata = 7;
|
||||
}
|
||||
if( boundMetadata < 0 )
|
||||
{
|
||||
boundMetadata = 0;
|
||||
}
|
||||
|
||||
if( this.currentMeta != boundMetadata )
|
||||
{
|
||||
@@ -86,7 +92,9 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
public void writeToNBT_TileEnergyCell( NBTTagCompound data )
|
||||
{
|
||||
if( !this.worldObj.isRemote )
|
||||
{
|
||||
data.setDouble( "internalCurrentPower", this.internalCurrentPower );
|
||||
}
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_READ )
|
||||
@@ -138,7 +146,9 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
}
|
||||
|
||||
if( this.internalCurrentPower < 0.01 && amt > 0.01 )
|
||||
{
|
||||
this.gridProxy.getNode().getGrid().postEvent( new MENetworkPowerStorage( this, PowerEventType.PROVIDE_POWER ) );
|
||||
}
|
||||
|
||||
this.internalCurrentPower += amt;
|
||||
if( this.internalCurrentPower > this.internalMaxPower )
|
||||
@@ -189,7 +199,9 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
if( this.internalCurrentPower > amt )
|
||||
{
|
||||
return amt;
|
||||
}
|
||||
return this.internalCurrentPower;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,10 +100,14 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
|
||||
try
|
||||
{
|
||||
if( this.gridProxy.getEnergy().isNetworkPowered() )
|
||||
{
|
||||
this.clientFlags |= POWERED_FLAG;
|
||||
}
|
||||
|
||||
if( this.gridProxy.getNode().meetsChannelRequirements() )
|
||||
{
|
||||
this.clientFlags |= CHANNEL_FLAG;
|
||||
}
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
{
|
||||
@@ -183,7 +187,9 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
|
||||
public boolean isActive()
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return this.isPowered() && ( CHANNEL_FLAG == ( this.clientFlags & CHANNEL_FLAG ) );
|
||||
}
|
||||
|
||||
return this.gridProxy.isActive();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user