@Override public IItemList<IAEItemStack> getAvailableItems( final IItemList<IAEItemStack> out ) { for( final IAEItemStack is : this.localCache ) { out.add( is ); } return out; }
@Override public void postChange( IBaseMonitor<IAEFluidStack> monitor, Iterable<IAEFluidStack> change, IActionSource actionSource ) { for( final IAEFluidStack is : change ) { this.fluids.add( is ); } }
@Override public void postChange( final IBaseMonitor<IAEItemStack> monitor, final Iterable<IAEItemStack> change, final IActionSource source ) { for( final IAEItemStack is : change ) { this.items.add( is ); } }
@Override public IItemList<IAEItemStack> getAvailableItems( final IItemList out ) { for( final IAEItemStack ais : this.itemListCache ) { out.add( ais ); } return out; }
private void addMissing( final IAEItemStack extra ) { this.missingCache.add( extra ); }
@Override public IAEItemStack injectItems( final IAEItemStack input, final Actionable mode, final IActionSource src ) { if( input == null ) { return null; } if( mode == Actionable.MODULATE ) { if( this.logInjections ) { this.injectedCache.add( input ); } this.localCache.add( input ); } return null; }
public void addEmitable( final IAEItemStack i ) { this.waitingFor.add( i ); this.postCraftingStatusChange( i ); }
void addMissing( IAEItemStack what ) { what = what.copy(); this.missing.add( what ); }
@Override public IItemList<T> getAvailableItems( final IItemList<T> out ) { for( final T item : this.getCellItems() ) { out.add( item ); } return out; }
@Override public IItemList<IAEItemStack> getAvailableItems( final IItemList out ) { for( final IAEItemStack ais : this.getStoredItems() ) { out.add( ais ); } return out; }
@Override public void postChange( final IBaseMonitor<IAEItemStack> monitor, final Iterable<IAEItemStack> change, final IActionSource actionSource ) { for( IAEItemStack is : change ) { is = is.copy(); is.setStackSize( 1 ); this.list.add( is ); } }
@Override public void add( T option ) { if( option != null && option.isCraftable() ) { option = option.copy(); option.setCraftable( false ); } this.target.add( option ); }
void addTask( IAEItemStack what, final long crafts, final ICraftingPatternDetails details, final int depth ) { if( crafts > 0 ) { what = what.copy(); what.setStackSize( what.getStackSize() * crafts ); this.crafting.add( what ); } }
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 ); } }
public void postUpdate( final IAEItemStack is ) { final IAEItemStack st = this.list.findPrecise( is ); if( st != null ) { st.reset(); st.add( is ); } else { this.list.add( is ); } }
protected CreativeCellInventory( final ItemStack o ) { final CellConfig cc = new CellConfig( o ); for( final ItemStack is : cc ) { if( !is.isEmpty() ) { final IAEItemStack i = AEItemStack.fromItemStack( is ); i.setStackSize( Integer.MAX_VALUE ); this.itemListCache.add( i ); } } }
@Override public IItemList<IAEItemStack> getAvailableItems( final IItemList<IAEItemStack> out ) { if( !this.target.getOutputSlot().getStackInSlot( 0 ).isEmpty() ) { out.add( AEItemStack.fromItemStack( this.target.getOutputSlot().getStackInSlot( 0 ) ) ); } return out; }
private IItemList<IAEItemStack> readList( final NBTTagList tag ) { final IItemList<IAEItemStack> out = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList(); if( tag == null ) { return out; } for( int x = 0; x < tag.tagCount(); x++ ) { final IAEItemStack ais = AEItemStack.fromNBT( tag.getCompoundTagAt( x ) ); if( ais != null ) { out.add( ais ); } } return out; }
@Override public IAEItemStack injectItems( final IAEItemStack input, final Actionable type, final IActionSource src ) { if( this.hasPermission( src ) ) { if( AEApi.instance().definitions().items().biometricCard().isSameAs( input.createItemStack() ) ) { if( this.canAccept( input ) ) { if( type == Actionable.SIMULATE ) { return null; } this.getStoredItems().add( input ); this.securityTile.inventoryChanged(); return null; } } } return input; }
@Override public void readFromNBT( final NBTTagCompound data ) { super.readFromNBT( data ); this.cm.readFromNBT( data ); if( data.hasKey( "paintedColor" ) ) { this.paintedColor = AEColor.values()[data.getByte( "paintedColor" )]; } this.securityKey = data.getLong( "securityKey" ); this.getConfigSlot().readFromNBT( data, "config" ); final NBTTagCompound storedItems = data.getCompoundTag( "storedItems" ); for( final Object key : storedItems.getKeySet() ) { final NBTBase obj = storedItems.getTag( (String) key ); if( obj instanceof NBTTagCompound ) { this.inventory.getStoredItems().add( AEItemStack.fromItemStack( new ItemStack( (NBTTagCompound) obj ) ) ); } } }