Assignment replaceable with operator assignment

This commit is contained in:
thatsIch 2015-03-26 10:41:45 +01:00
parent 8ef286b9d6
commit bd2ee1c5ea
15 changed files with 34 additions and 33 deletions

View file

@ -173,7 +173,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
int viewStart = 0;// myScrollBar.getCurrentScroll() * 5;
int viewEnd = viewStart + 5 * 4;
String ToolTip = "";
String toolTip = "";
int toolPosX = 0;
int toolPosY = 0;
@ -199,11 +199,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
if ( this.tooltip == z - viewStart )
{
ToolTip = Platform.getItemDisplayName( this.repo.getItem( z ) );
toolTip = Platform.getItemDisplayName( this.repo.getItem( z ) );
ToolTip = ToolTip + ( '\n' + GuiText.Installed.getLocal() + ": " + (refStack.getStackSize()));
toolTip += ( '\n' + GuiText.Installed.getLocal() + ": " + ( refStack.getStackSize() ) );
if ( refStack.getCountRequestable() > 0 )
ToolTip = ToolTip + ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ));
toolTip += ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ) );
toolPosX = x * sectionLength + xo + sectionLength - 8;
toolPosY = y * 18 + yo;
@ -222,10 +222,10 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
if ( this.tooltip >= 0 && ToolTip.length() > 0 )
if ( this.tooltip >= 0 && toolTip.length() > 0 )
{
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
this.drawTooltip( toolPosX, toolPosY + 10, 0, ToolTip );
this.drawTooltip( toolPosX, toolPosY + 10, 0, toolTip );
GL11.glPopAttrib();
}

View file

@ -118,7 +118,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
{
if ( cr.spin )
{
now = now % 100000;
now %= 100000;
this.model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
}
else
@ -139,14 +139,14 @@ public class RenderBlockSkyCompass extends BaseBlockRender
}
else
{
now = now % 1000000;
now %= 1000000;
this.model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
}
}
else
{
now = now % 100000;
now %= 100000;
this.model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
}
@ -195,7 +195,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
{
if ( cr.spin )
{
now = now % 100000;
now %= 100000;
this.model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
}
else
@ -204,7 +204,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
}
else
{
now = now % 1000000;
now %= 1000000;
this.model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
}

View file

@ -114,7 +114,7 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
IBiometricCard bc = (IBiometricCard) a.getItem();
for (SecurityPermissions sp : bc.getPermissions( a ))
this.security = this.security | (1 << sp.ordinal());
this.security |= ( 1 << sp.ordinal() );
}
this.updatePowerStatus();

View file

@ -88,7 +88,7 @@ public class AETrading implements IVillageTradeHandler
ItemStack reverseTo = From.copy();
ItemStack reverseFrom = To.copy();
reverseFrom.stackSize = (int) (reverseFrom.stackSize * (rand.nextFloat() * 3.0f + 1.0f));
reverseFrom.stackSize *= rand.nextFloat() * 3.0f + 1.0f;
this.addToList( list, reverseFrom, reverseTo );
}

View file

@ -240,7 +240,7 @@ public class GridConnection implements IGridConnection, IPathItem
{
if ( this.getUsedChannels() != this.getLastUsedChannels() )
{
this.channelData = ( this.channelData & 0xff );
this.channelData &= 0xff;
this.channelData |= this.channelData << 8;
if ( this.sideA.getInternalGrid() != null )

View file

@ -147,7 +147,7 @@ public class TickManagerCache implements ITickManager
this.awake.put( node, tt );
// configure sort.
tt.lastTick = tt.lastTick - tt.request.maxTickRate;
tt.lastTick -= tt.request.maxTickRate;
tt.current_rate = tt.request.minTickRate;
// prevent dupes and tick build up.

View file

@ -338,7 +338,8 @@ public class CellInventory implements ICellInventory
private void updateItemCount(long delta)
{
this.tagCompound.setInteger( ITEM_COUNT_TAG, this.storedItemCount = (int) (this.storedItemCount + delta) );
this.storedItemCount += delta;
this.tagCompound.setInteger( ITEM_COUNT_TAG, this.storedItemCount );
}
@Override

View file

@ -584,7 +584,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
IPart p = this.getPart( ForgeDirection.getOrientation( x ) );
if ( p != null )
{
sides = sides | (1 << x);
sides |= ( 1 << x );
}
}

View file

@ -465,12 +465,12 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
if ( !Worked )
i.onItemUse( is, player, w, x, y, z, side.getOpposite().ordinal(), side.offsetX, side.offsetY, side.offsetZ );
maxStorage = maxStorage - is.stackSize;
maxStorage -= is.stackSize;
}
else
{
i.onItemUse( is, player, w, x, y, z, side.getOpposite().ordinal(), side.offsetX, side.offsetY, side.offsetZ );
maxStorage = maxStorage - is.stackSize;
maxStorage -= is.stackSize;
}
}
else

View file

@ -161,13 +161,13 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
try
{
if ( this.proxy.getEnergy().isNetworkPowered() )
this.clientFlags = this.clientFlags | this.POWERED_FLAG;
this.clientFlags |= this.POWERED_FLAG;
if ( this.proxy.getPath().isNetworkBooting() )
this.clientFlags = this.clientFlags | this.BOOTING_FLAG;
this.clientFlags |= this.BOOTING_FLAG;
if ( this.proxy.getNode().meetsChannelRequirements() )
this.clientFlags = this.clientFlags | this.CHANNEL_FLAG;
this.clientFlags |= this.CHANNEL_FLAG;
}
catch (GridAccessException e)
{

View file

@ -30,14 +30,14 @@ import java.util.Map.Entry;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import com.google.common.collect.HashMultimap;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.LoaderState;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
import com.google.common.collect.HashMultimap;
import appeng.api.AEApi;
import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RecipeError;
@ -392,7 +392,7 @@ public class RecipeHandler implements IRecipeHandler
inQuote = !inQuote;
break;
default:
token = token + c;
token += c;
}
}
else
@ -437,7 +437,7 @@ public class RecipeHandler implements IRecipeHandler
break;
default:
token = token + c;
token += c;
}
}

View file

@ -59,8 +59,8 @@ public class CompassReader
private CompassRegion getRegion(int cx, int cz)
{
long pos = cx >> 10;
pos = pos << 32;
pos = pos | (cz >> 10);
pos <<= 32;
pos |= ( cz >> 10 );
CompassRegion cr = this.regions.get( pos );
if ( cr == null )

View file

@ -81,8 +81,8 @@ public class CompassRegion
{
if ( this.hasFile )
{
cx = cx & 0x3FF;
cz = cz & 0x3FF;
cx &= 0x3FF;
cz &= 0x3FF;
int val = this.read( cx, cz );
if ( val != 0 )

View file

@ -361,7 +361,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
public void markForUpdate()
{
if ( this.renderFragment > 0 )
this.renderFragment = this.renderFragment | 1;
this.renderFragment |= 1;
else
{
// TODO: Optimize Network Load

View file

@ -137,7 +137,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
for (int num = 0; num < this.inv.getSizeInventory(); num++)
{
if ( this.inv.getStackInSlot( num ) != null )
slot = slot | (1 << num);
slot |= ( 1 << num );
}
data.writeByte( slot );
@ -408,7 +408,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
src.extractAEPower( powerConsumption, Actionable.MODULATE, PowerMultiplier.CONFIG );
if ( this.processingTime == 0 )
this.processingTime = this.processingTime + speedFactor;
this.processingTime += speedFactor;
else
this.processingTime += TicksSinceLastCall * speedFactor;
}