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
@@ -71,7 +71,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
this.totalBytes = kilobytes * 1024;
this.component = whichCell;
switch ( this.component )
switch( this.component )
{
case Cell1kPart:
this.idleDrain = 0.5;
@@ -100,31 +100,25 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
{
IMEInventoryHandler inventory = AEApi.instance().registries().cell().getCellInventory( stack, null, StorageChannel.ITEMS );
if ( inventory instanceof ICellInventoryHandler )
if( inventory instanceof ICellInventoryHandler )
{
ICellInventoryHandler handler = ( ICellInventoryHandler ) inventory;
ICellInventoryHandler handler = (ICellInventoryHandler) inventory;
ICellInventory cellInventory = handler.getCellInv();
if ( cellInventory != null )
if( cellInventory != null )
{
lines.add( cellInventory.getUsedBytes() + " " + GuiText.Of.getLocal() + ' '
+ cellInventory.getTotalBytes() + ' '
+ GuiText.BytesUsed.getLocal() );
lines.add( cellInventory.getUsedBytes() + " " + GuiText.Of.getLocal() + ' ' + cellInventory.getTotalBytes() + ' ' + GuiText.BytesUsed.getLocal() );
lines.add( cellInventory.getStoredItemTypes() + " " + GuiText.Of.getLocal()
+ ' ' + cellInventory.getTotalItemTypes() + ' '
+ GuiText.Types.getLocal() );
lines.add( cellInventory.getStoredItemTypes() + " " + GuiText.Of.getLocal() + ' ' + cellInventory.getTotalItemTypes() + ' ' + GuiText.Types.getLocal() );
if ( handler.isPreformatted() )
if( handler.isPreformatted() )
{
String List = ( handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included
: GuiText.Excluded ).getLocal();
String List = ( handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included : GuiText.Excluded ).getLocal();
if ( handler.isFuzzy() )
if( handler.isFuzzy() )
lines.add( GuiText.Partitioned.getLocal() + " - " + List + ' ' + GuiText.Fuzzy.getLocal() );
else
lines.add( GuiText.Partitioned.getLocal() + " - " + List + ' ' + GuiText.Precise.getLocal() );
}
}
}
@@ -204,7 +198,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
{
return FuzzyMode.valueOf( fz );
}
catch ( Throwable t )
catch( Throwable t )
{
return FuzzyMode.IGNORE_ALL;
}
@@ -225,35 +219,35 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
private boolean disassembleDrive( ItemStack stack, World world, EntityPlayer player )
{
if ( player.isSneaking() )
if( player.isSneaking() )
{
if ( Platform.isClient() )
if( Platform.isClient() )
return false;
InventoryPlayer playerInventory = player.inventory;
IMEInventoryHandler inv = AEApi.instance().registries().cell().getCellInventory( stack, null, StorageChannel.ITEMS );
if ( inv != null && playerInventory.getCurrentItem() == stack )
if( inv != null && playerInventory.getCurrentItem() == stack )
{
InventoryAdaptor ia = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
IItemList<IAEItemStack> list = inv.getAvailableItems( StorageChannel.ITEMS.createList() );
if ( list.isEmpty() && ia != null )
if( list.isEmpty() && ia != null )
{
playerInventory.setInventorySlotContents( playerInventory.currentItem, null );
ItemStack extraB = ia.addItems( this.component.stack( 1 ) );
if ( extraB != null )
if( extraB != null )
player.dropPlayerItemWithRandomChoice( extraB, false );
for ( ItemStack storageCellStack : AEApi.instance().definitions().materials().emptyStorageCell().maybeStack( 1 ).asSet() )
for( ItemStack storageCellStack : AEApi.instance().definitions().materials().emptyStorageCell().maybeStack( 1 ).asSet() )
{
final ItemStack extraA = ia.addItems( storageCellStack );
if ( extraA != null )
if( extraA != null )
{
player.dropPlayerItemWithRandomChoice( extraA, false );
}
}
if ( player.inventoryContainer != null )
if( player.inventoryContainer != null )
player.inventoryContainer.detectAndSendChanges();
return true;
@@ -272,7 +266,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
@Override
public ItemStack getContainerItem( ItemStack itemStack )
{
for ( ItemStack stack : AEApi.instance().definitions().materials().emptyStorageCell().maybeStack( 1 ).asSet() )
for( ItemStack stack : AEApi.instance().definitions().materials().emptyStorageCell().maybeStack( 1 ).asSet() )
{
return stack;
}