CellUpgrades cu = (CellUpgrades) getUpgradesInventory( item );
if ( cu != null )
shots += cu.getInstalledUpgrades( Upgrades.SPEED );
IMEInventory inv = AEApi.instance().registries().cell().getCellInventory( item, null, StorageChannel.ITEMS );
if ( inv != null )
{
IItemList itemList = inv.getAvailableItems( AEApi.instance().storage().createItemList() );
IAEStack aeAmmo = itemList.getFirstItem();
if ( aeAmmo instanceof IAEItemStack )
{
shots = Math.min( shots, (int) aeAmmo.getStackSize() );
for (int sh = 0; sh < shots; sh++)
{
extractAEPower( item, 1600 );
if ( Platform.isClient() )
return item;
aeAmmo.setStackSize( 1 );
ItemStack ammo = ((IAEItemStack) aeAmmo).getItemStack();
if ( ammo == null )
return item;
ammo.stackSize = 1;
aeAmmo = inv.extractItems( aeAmmo, Actionable.MODULATE, new PlayerSource( p, null ) );
if ( aeAmmo == null )
return item;
float f = 1.0F;
float f1 = p.prevRotationPitch + (p.rotationPitch - p.prevRotationPitch) * f;