Format sourcecode

This commit is contained in:
yueh
2017-07-20 21:17:10 +02:00
parent 66437897be
commit 621910df91
295 changed files with 2142 additions and 1562 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ public class GridConnection implements IGridConnection, IPathItem
final String aCoordinates = a.getGridBlock().getLocation().toString();
final String bCoordinates = b.getGridBlock().getLocation().toString();
throw new ExistingConnectionException( String.format( EXISTING_CONNECTION_MESSAGE, aMachineClass, aCoordinates, bMachineClass, bCoordinates, fromAtoB ) );
throw new ExistingConnectionException( String.format( EXISTING_CONNECTION_MESSAGE, aMachineClass, aCoordinates, bMachineClass, bCoordinates,
fromAtoB ) );
}
this.sideA = a;
+2 -1
View File
@@ -78,7 +78,8 @@ public class NetworkEventBus
}
else
{
throw new IllegalStateException( "Invalid ME Network Event Subscriber, " + m.getName() + "s Parameter must extend MENetworkEvent." );
throw new IllegalStateException( "Invalid ME Network Event Subscriber, " + m
.getName() + "s Parameter must extend MENetworkEvent." );
}
}
else
+6 -3
View File
@@ -91,7 +91,8 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
{
private static final ExecutorService CRAFTING_POOL;
private static final Comparator<ICraftingPatternDetails> COMPARATOR = new Comparator<ICraftingPatternDetails>(){
private static final Comparator<ICraftingPatternDetails> COMPARATOR = new Comparator<ICraftingPatternDetails>()
{
@Override
public int compare( final ICraftingPatternDetails firstDetail, final ICraftingPatternDetails nextDetail )
{
@@ -101,7 +102,8 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
static
{
final ThreadFactory factory = new ThreadFactory(){
final ThreadFactory factory = new ThreadFactory()
{
@Override
public Thread newThread( final Runnable ar )
@@ -535,7 +537,8 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
}
}
Collections.sort( validCpusClusters, new Comparator<CraftingCPUCluster>(){
Collections.sort( validCpusClusters, new Comparator<CraftingCPUCluster>()
{
@Override
public int compare( final CraftingCPUCluster firstCluster, final CraftingCPUCluster nextCluster )
{
+4 -4
View File
@@ -351,10 +351,10 @@ public class PathGridCache implements IPathingGrid
players.add( n.getPlayerID() );
}
// for( final int id : players )
// {
// Platform.addStat( id, currentBracket.getAchievement() );
// }
// for( final int id : players )
// {
// Platform.addStat( id, currentBracket.getAchievement() );
// }
}
}
this.lastChannels = this.getChannelsInUse();
+12 -3
View File
@@ -124,17 +124,26 @@ public class SpatialPylonCache implements ISpatialCache
{
case X:
this.isValid = this.isValid && ( ( this.captureMax.y == cl.getMin().y || this.captureMin.y == cl.getMax().y ) || ( this.captureMax.z == cl.getMin().z || this.captureMin.z == cl.getMax().z ) ) && ( ( this.captureMax.y == cl.getMax().y || this.captureMin.y == cl.getMin().y ) || ( this.captureMax.z == cl.getMax().z || this.captureMin.z == cl.getMin().z ) );
this.isValid = this.isValid && ( ( this.captureMax.y == cl.getMin().y || this.captureMin.y == cl
.getMax().y ) || ( this.captureMax.z == cl.getMin().z || this.captureMin.z == cl.getMax().z ) ) && ( ( this.captureMax.y == cl
.getMax().y || this.captureMin.y == cl
.getMin().y ) || ( this.captureMax.z == cl.getMax().z || this.captureMin.z == cl.getMin().z ) );
break;
case Y:
this.isValid = this.isValid && ( ( this.captureMax.x == cl.getMin().x || this.captureMin.x == cl.getMax().x ) || ( this.captureMax.z == cl.getMin().z || this.captureMin.z == cl.getMax().z ) ) && ( ( this.captureMax.x == cl.getMax().x || this.captureMin.x == cl.getMin().x ) || ( this.captureMax.z == cl.getMax().z || this.captureMin.z == cl.getMin().z ) );
this.isValid = this.isValid && ( ( this.captureMax.x == cl.getMin().x || this.captureMin.x == cl
.getMax().x ) || ( this.captureMax.z == cl.getMin().z || this.captureMin.z == cl.getMax().z ) ) && ( ( this.captureMax.x == cl
.getMax().x || this.captureMin.x == cl
.getMin().x ) || ( this.captureMax.z == cl.getMax().z || this.captureMin.z == cl.getMin().z ) );
break;
case Z:
this.isValid = this.isValid && ( ( this.captureMax.y == cl.getMin().y || this.captureMin.y == cl.getMax().y ) || ( this.captureMax.x == cl.getMin().x || this.captureMin.x == cl.getMax().x ) ) && ( ( this.captureMax.y == cl.getMax().y || this.captureMin.y == cl.getMin().y ) || ( this.captureMax.x == cl.getMax().x || this.captureMin.x == cl.getMin().x ) );
this.isValid = this.isValid && ( ( this.captureMax.y == cl.getMin().y || this.captureMin.y == cl
.getMax().y ) || ( this.captureMax.x == cl.getMin().x || this.captureMin.x == cl.getMax().x ) ) && ( ( this.captureMax.y == cl
.getMax().y || this.captureMin.y == cl
.getMin().y ) || ( this.captureMax.x == cl.getMax().x || this.captureMin.x == cl.getMin().x ) );
break;
case UNFORMED:
@@ -759,7 +759,8 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
if( details.isCraftable() )
{
FMLCommonHandler.instance().firePlayerCraftingEvent( Platform.getPlayer( (WorldServer) this.getWorld() ), details.getOutput( ic, this.getWorld() ), ic );
FMLCommonHandler.instance().firePlayerCraftingEvent( Platform.getPlayer( (WorldServer) this.getWorld() ),
details.getOutput( ic, this.getWorld() ), ic );
for( int x = 0; x < ic.getSizeInventory(); x++ )
{
@@ -981,7 +982,8 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
final int hash = System.identityHashCode( this );
final int hmm = this.finalOutput == null ? 0 : this.finalOutput.hashCode();
return Long.toString( now, Character.MAX_RADIX ) + '-' + Integer.toString( hash, Character.MAX_RADIX ) + '-' + Integer.toString( hmm, Character.MAX_RADIX );
return Long.toString( now, Character.MAX_RADIX ) + '-' + Integer.toString( hash, Character.MAX_RADIX ) + '-' + Integer.toString( hmm,
Character.MAX_RADIX );
}
private NBTTagCompound generateLinkData( final String craftingID, final boolean standalone, final boolean req )
@@ -260,12 +260,14 @@ public class QuantumCluster implements ILocatable, IAECluster
@Override
public Iterator<IGridHost> getTiles()
{
return new ChainedIterator<IGridHost>( this.getRing()[0], this.getRing()[1], this.getRing()[2], this.getRing()[3], this.getRing()[4], this.getRing()[5], this.getRing()[6], this.getRing()[7], this.center );
return new ChainedIterator<IGridHost>( this.getRing()[0], this.getRing()[1], this.getRing()[2], this.getRing()[3], this.getRing()[4], this
.getRing()[5], this.getRing()[6], this.getRing()[7], this.center );
}
public boolean isCorner( final TileQuantumBridge tileQuantumBridge )
{
return this.getRing()[0] == tileQuantumBridge || this.getRing()[2] == tileQuantumBridge || this.getRing()[4] == tileQuantumBridge || this.getRing()[6] == tileQuantumBridge;
return this.getRing()[0] == tileQuantumBridge || this.getRing()[2] == tileQuantumBridge || this.getRing()[4] == tileQuantumBridge || this
.getRing()[6] == tileQuantumBridge;
}
@Override
@@ -60,7 +60,8 @@ public class MEMonitorPassThrough<T extends IAEStack<T>> extends MEPassThrough<T
}
this.monitor = null;
final IItemList<T> before = this.getInternal() == null ? this.getWrappedChannel().createList() : this.getInternal().getAvailableItems( new ItemListIgnoreCrafting( this.getWrappedChannel().createList() ) );
final IItemList<T> before = this.getInternal() == null ? this.getWrappedChannel().createList() : this.getInternal()
.getAvailableItems( new ItemListIgnoreCrafting( this.getWrappedChannel().createList() ) );
super.setInternal( i );
if( i instanceof IMEMonitor )
@@ -68,7 +69,8 @@ public class MEMonitorPassThrough<T extends IAEStack<T>> extends MEPassThrough<T
this.monitor = (IMEMonitor<T>) i;
}
final IItemList<T> after = this.getInternal() == null ? this.getWrappedChannel().createList() : this.getInternal().getAvailableItems( new ItemListIgnoreCrafting( this.getWrappedChannel().createList() ) );
final IItemList<T> after = this.getInternal() == null ? this.getWrappedChannel().createList() : this.getInternal()
.getAvailableItems( new ItemListIgnoreCrafting( this.getWrappedChannel().createList() ) );
if( this.monitor != null )
{
@@ -97,7 +97,8 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
{
final IMEInventoryHandler<T> inv = ii.next();
if( inv.validForPass( 1 ) && inv.canAccept( input ) && ( inv.isPrioritized( input ) || inv.extractItems( input, Actionable.SIMULATE, src ) != null ) )
if( inv.validForPass( 1 ) && inv
.canAccept( input ) && ( inv.isPrioritized( input ) || inv.extractItems( input, Actionable.SIMULATE, src ) != null ) )
{
input = inv.injectItems( input, type, src );
}