Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
@@ -56,41 +56,41 @@ public class PartConversionMonitor extends PartStorageMonitor
@Override
public boolean onPartShiftActivate( EntityPlayer player, Vec3 pos )
{
if ( Platform.isClient() )
if( Platform.isClient() )
return true;
if ( !this.proxy.isActive() )
if( !this.proxy.isActive() )
return false;
if ( !Platform.hasPermissions( this.getLocation(), player ) )
if( !Platform.hasPermissions( this.getLocation(), player ) )
return false;
boolean ModeB = false;
ItemStack item = player.getCurrentEquippedItem();
if ( item == null && this.getDisplayed() != null )
if( item == null && this.getDisplayed() != null )
{
ModeB = true;
item = ( (IAEItemStack) this.getDisplayed() ).getItemStack();
}
if ( item != null )
if( item != null )
{
try
{
if ( !this.proxy.isActive() )
if( !this.proxy.isActive() )
return false;
IEnergySource energy = this.proxy.getEnergy();
IMEMonitor<IAEItemStack> cell = this.proxy.getStorage().getItemInventory();
IAEItemStack input = AEItemStack.create( item );
if ( ModeB )
if( ModeB )
{
for ( int x = 0; x < player.inventory.getSizeInventory(); x++ )
for( int x = 0; x < player.inventory.getSizeInventory(); x++ )
{
ItemStack targetStack = player.inventory.getStackInSlot( x );
if ( input.equals( targetStack ) )
if( input.equals( targetStack ) )
{
IAEItemStack insertItem = input.copy();
insertItem.setStackSize( targetStack.stackSize );
@@ -105,7 +105,7 @@ public class PartConversionMonitor extends PartStorageMonitor
player.inventory.setInventorySlotContents( player.inventory.currentItem, failedToInsert == null ? null : failedToInsert.getItemStack() );
}
}
catch ( GridAccessException e )
catch( GridAccessException e )
{
// :P
}
@@ -117,11 +117,11 @@ public class PartConversionMonitor extends PartStorageMonitor
protected void extractItem( EntityPlayer player )
{
IAEItemStack input = (IAEItemStack) this.getDisplayed();
if ( input != null )
if( input != null )
{
try
{
if ( !this.proxy.isActive() )
if( !this.proxy.isActive() )
return;
IEnergySource energy = this.proxy.getEnergy();
@@ -131,23 +131,23 @@ public class PartConversionMonitor extends PartStorageMonitor
input.setStackSize( is.getMaxStackSize() );
IAEItemStack retrieved = Platform.poweredExtraction( energy, cell, input, new PlayerSource( player, this ) );
if ( retrieved != null )
if( retrieved != null )
{
ItemStack newItems = retrieved.getItemStack();
InventoryAdaptor adaptor = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
newItems = adaptor.addItems( newItems );
if ( newItems != null )
if( newItems != null )
{
TileEntity te = this.tile;
List<ItemStack> list = Collections.singletonList( newItems );
Platform.spawnDrops( player.worldObj, te.xCoord + this.side.offsetX, te.yCoord + this.side.offsetY, te.zCoord + this.side.offsetZ, list );
}
if ( player.openContainer != null )
if( player.openContainer != null )
player.openContainer.detectAndSendChanges();
}
}
catch ( GridAccessException e )
catch( GridAccessException e )
{
// :P
}