@Override public void postChange( IBaseMonitor<IAEFluidStack> monitor, Iterable<IAEFluidStack> change, IActionSource actionSource ) { for( final IAEFluidStack is : change ) { this.fluids.add( is ); } }
@Override public boolean isEmpty() { return this.target.isEmpty(); }
public void postUpdate( final IAEFluidStack is ) { final IAEFluidStack st = this.list.findPrecise( is ); if( st != null ) { st.reset(); st.add( is ); } else { this.list.add( is ); } }
if( !this.fluids.isEmpty() ) final IAEFluidStack send = monitorCache.findPrecise( is ); if( send == null ) this.fluids.resetStatus();
@Override public T findPrecise( final T i ) { return this.target.findPrecise( i ); }
public ICraftingLink submitJob( final IGrid g, final ICraftingJob job, final IActionSource src, final ICraftingRequester requestingMachine ) if( !this.tasks.isEmpty() || !this.waitingFor.isEmpty() ) this.waitingFor.resetStatus(); ( (CraftingJob) job ).getTree().setJob( ci, this, src ); if( ci.commit( src ) ) this.inventory.getItemList().resetStatus(); this.inventory.getItemList().resetStatus();
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; }
public void cancel() { if( this.myLastLink != null ) { this.myLastLink.cancel(); } final IItemList<IAEItemStack> list; this.getListOfItem( list = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList(), CraftingItemList.ALL ); for( final IAEItemStack is : list ) { this.postChange( is, this.machineSrc ); } this.isComplete = true; this.myLastLink = null; this.tasks.clear(); // final ImmutableSet<IAEItemStack> items = ImmutableSet.copyOf( this.waitingFor ); final List<IAEItemStack> items = new ArrayList<>( this.waitingFor.size() ); this.waitingFor.forEach( stack -> items.add( stack.copy().setStackSize( -stack.getStackSize() ) ) ); this.waitingFor.resetStatus(); for( final IAEItemStack is : items ) { this.postCraftingStatusChange( is ); } this.finalOutput = null; this.updateCPU(); this.storeItems(); // marks dirty }
this.list.resetStatus(); int high = 0; boolean changed = false; this.list.add( cis.aeStack ); this.list.add( stack );
@Override public void resetStatus() { this.target.resetStatus(); } }
@Override public int size() { return this.target.size(); }
void getPlan( final IItemList<IAEItemStack> plan ) { if( this.missing > 0 ) { final IAEItemStack o = this.what.copy(); o.setStackSize( this.missing ); plan.add( o ); } if( this.howManyEmitted > 0 ) { final IAEItemStack i = this.what.copy(); i.setCountRequestable( this.howManyEmitted ); plan.addRequestable( i ); } for( final IAEItemStack i : this.used ) { plan.add( i.copy() ); } for( final CraftingTreeProcess pro : this.nodes ) { pro.getPlan( plan ); } }
final Collection<IAEItemStack> fuzzyList = monitor.getStorageList().findFuzzy( myStack, fzMode ); for( final IAEItemStack st : fuzzyList ) final IAEItemStack r = monitor.getStorageList().findPrecise( myStack ); if( r == null )
public void updateView() { this.view.clear(); this.view.ensureCapacity(this.list.size()); final boolean searchByAspect = sba; Stream<T> stream = StreamSupport.stream(this.list.spliterator(), false);
@Override public T getFirstItem() { return this.target.getFirstItem(); }
@Override public IItemList<IAEEssentiaStack> getAvailableItems(IItemList<IAEEssentiaStack> list) { this.storedAspects.forEach(list::add); return list; }
if( !this.items.isEmpty() ) final IAEItemStack send = monitorCache.findPrecise( is ); if( send == null ) this.items.resetStatus();
@Override public boolean isPrioritized( final IAEItemStack input ) { return this.itemListCache.findPrecise( input ) != null; }