@Override public void addRequestable( final IAEItemStack option ) { if( option == null ) { return; } final IAEItemStack st = this.records.get( ( (AEItemStack) option ).getSharedStack() ); if( st != null ) { st.setCountRequestable( st.getCountRequestable() + option.getCountRequestable() ); return; } final IAEItemStack opt = option.copy(); opt.setStackSize( 0 ); opt.setCraftable( false ); opt.setCountRequestable( option.getCountRequestable() ); this.putItemRecord( opt ); }
@Override protected void renderToolTip( final ItemStack stack, final int x, final int y ) { final Slot s = this.getSlot( x, y ); if( s instanceof SlotME && stack != null ) { IAEItemStack myStack = null; try { final SlotME theSlotField = (SlotME) s; myStack = theSlotField.getAEStack(); } catch( final Throwable ignore ) { } if( myStack != null ) { ITooltipFlag.TooltipFlags tooltipFlag = this.mc.gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL; List<String> currentToolTip = stack.getTooltip( this.mc.player, tooltipFlag ); while( currentToolTip.size() > 1 ) { currentToolTip.remove( 1 ); } currentToolTip.add( GuiText.Installed.getLocal() + ": " + ( myStack.getStackSize() ) ); currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) ); this.drawTooltip( x, y, currentToolTip ); } } super.renderToolTip( stack, x, y ); }
if( myStack.getCountRequestable() > 0 ) final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ); final String format = String.format( local, formattedAmount );
@Override public void add( final IAEItemStack option ) { if( option == null ) { return; } this.incStackSize( option.getStackSize() ); this.setCountRequestable( this.getCountRequestable() + option.getCountRequestable() ); this.setCraftable( this.isCraftable() || option.isCraftable() ); }
if( refStack.getCountRequestable() > 0 ) toolTip += ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ) );
p.setStackSize( out.getCountRequestable() );
p.setStackSize(out.getCountRequestable());