@Override public boolean isEmpty() { return this.list.isEmpty(); }
@Override public boolean isEmpty() { return this.target.isEmpty(); }
@Override public boolean isEmpty() { return this.list.isEmpty(); }
@Override public boolean isBusy() { final Iterator<Entry<ICraftingPatternDetails, TaskProgress>> i = this.tasks.entrySet().iterator(); while( i.hasNext() ) { if( i.next().getValue().value <= 0 ) { i.remove(); } } return !this.tasks.isEmpty() || !this.waitingFor.isEmpty(); }
@Override public boolean containsItems() { return !this.getList().isEmpty(); }
@SuppressWarnings( { "rawtypes", "unchecked" } ) private static boolean isCellEmpty( ICellInventory inv ) { if( inv != null ) { return inv.getAvailableItems( inv.getChannel().createList() ).isEmpty(); } return true; }
if( this.inventory.getItemList().isEmpty() )
private boolean matches( final FullnessMode fm, final IMEInventory src ) { if( fm == FullnessMode.HALF ) { return true; } final IItemList<? extends IAEStack> myList; if( src instanceof IMEMonitor ) { myList = ( (IMEMonitor) src ).getStorageList(); } else { myList = src.getAvailableItems( src.getChannel().createList() ); } if( fm == FullnessMode.EMPTY ) { return myList.isEmpty(); } final IAEStack test = myList.getFirstItem(); if( test != null ) { test.setStackSize( 1 ); return src.injectItems( test, Actionable.SIMULATE, this.mySrc ) != null; } return false; }
private ItemStack doRemoveItems( final int amount, final ItemStack filter, final IInventoryDestination destination, final Actionable type ) { IAEItemStack req = null; if( filter.isEmpty() ) { final IItemList<IAEItemStack> list = this.getList(); if( !list.isEmpty() ) { req = list.getFirstItem(); } } else { req = AEItemStack.fromItemStack( filter ); } IAEItemStack out = null; if( req != null ) { req.setStackSize( amount ); out = this.target.extractItems( req, type, this.src ); } if( out != null ) { return out.createItemStack(); } return ItemStack.EMPTY; }
if( !list.isEmpty() )
private void storeItems() { final IGrid g = this.getGrid(); if( g == null ) { return; } final IStorageGrid sg = g.getCache( IStorageGrid.class ); final IMEInventory<IAEItemStack> ii = sg.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ); for( IAEItemStack is : this.inventory.getItemList() ) { is = this.inventory.extractItems( is.copy(), Actionable.MODULATE, this.machineSrc ); if( is != null ) { this.postChange( is, this.machineSrc ); is = ii.injectItems( is, Actionable.MODULATE, this.machineSrc ); } if( is != null ) { this.inventory.injectItems( is, Actionable.MODULATE, this.machineSrc ); } } if( this.inventory.getItemList().isEmpty() ) { this.inventory = new MECraftingInventory(); } this.markDirty(); }
if( this.cellItems.isEmpty() )
public ICraftingLink submitJob( final IGrid g, final ICraftingJob job, final IActionSource src, final ICraftingRequester requestingMachine ) if( !this.tasks.isEmpty() || !this.waitingFor.isEmpty() )
if( !this.fluids.isEmpty() )
if( !priorityList.isEmpty() )
@Override public void detectAndSendChanges() if( Platform.isServer() && this.getMonitor() != null && !this.list.isEmpty() )
if( !this.items.isEmpty() )
if( list.isEmpty() && ia != null )
if( !priorityList.isEmpty() )
@Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (world.isRemote || hand != EnumHand.MAIN_HAND) return super.onBlockActivated(world, pos, state, player, hand, facing, hitX, hitY, hitZ); TileEntity te = world.getTileEntity(pos); if (te instanceof TileInfusionProvider) { TileInfusionProvider inf = (TileInfusionProvider) te; if (player.isSneaking()) { if (inf.getStoredAspects() != null && !inf.getStoredAspects().isEmpty()) { player.sendMessage(new TextComponentString("Stored Aspects:")); for (IAEEssentiaStack stack : inf.getStoredAspects()) player.sendMessage(new TextComponentString(stack.getAspect().getName() + " = " + stack.getStackSize())); } else { player.sendMessage(new TextComponentString("No aspects found")); } } // FIXME: Make sure it updates itself, can be removed if TileInfusionProvider monitors the me network for changes te.markDirty(); return true; } return false; }