Examples of InscriberRecipe


Examples of appeng.recipes.handlers.Inscribe.InscriberRecipe

        if ( name.length() > 0 )
          display.setString( "Name", name );
        else
          display.removeTag( "Name" );

        return new InscriberRecipe( new ItemStack[] { startingItem }, PlateA, PlateB, renamedItem, false );
      }
    }

    for (InscriberRecipe i : Inscribe.recipes)
    {
View Full Code Here

Examples of appeng.recipes.handlers.Inscribe.InscriberRecipe

      finalStep++;
      if ( finalStep == 8 )
      {

        InscriberRecipe out = getTask();
        if ( out != null )
        {
          ItemStack is = out.output.copy();
          InventoryAdaptor ad = InventoryAdaptor.getAdaptor( new WrapperInventoryRange( inv, 3, 1, true ), ForgeDirection.UNKNOWN );

          if ( ad.addItems( is ) == null )
          {
            processingTime = 0;
            if ( out.usePlates )
            {
              setInventorySlotContents( 0, null );
              setInventorySlotContents( 1, null );
            }
            setInventorySlotContents( 2, null );
          }
        }

        markDirty();

      }
      else if ( finalStep == 16 )
      {
        finalStep = 0;
        smash = false;
        markForUpdate();
      }
    }
    else
    {
      IEnergyGrid eg;
      try
      {
        eg = gridProxy.getEnergy();
        IEnergySource src = this;

        // Base 1, increase by 1 for each card
        int speedFactor = 1 + upgrades.getInstalledUpgrades( Upgrades.SPEED );
        int powerConsumption = 10 * speedFactor;
        double powerThreshold = powerConsumption - 0.01;
        double powerReq = extractAEPower( powerConsumption, Actionable.SIMULATE, PowerMultiplier.CONFIG );

        if ( powerReq <= powerThreshold )
        {
          src = eg;
          powerReq = eg.extractAEPower( powerConsumption, Actionable.SIMULATE, PowerMultiplier.CONFIG );
        }

        if ( powerReq > powerThreshold )
        {
          src.extractAEPower( powerConsumption, Actionable.MODULATE, PowerMultiplier.CONFIG );

          if ( processingTime == 0 )
            processingTime = processingTime + speedFactor;
          else
            processingTime += TicksSinceLastCall * speedFactor;
        }
      }
      catch (GridAccessException e)
      {
        // :P
      }

      if ( processingTime > maxProcessingTime )
      {
        processingTime = maxProcessingTime;
        InscriberRecipe out = getTask();
        if ( out != null )
        {
          ItemStack is = out.output.copy();
          InventoryAdaptor ad = InventoryAdaptor.getAdaptor( new WrapperInventoryRange( inv, 3, 1, true ), ForgeDirection.UNKNOWN );
          if ( ad.simulateAdd( is ) == null )
View Full Code Here

Examples of appeng.recipes.handlers.Inscribe.InscriberRecipe

    {
      ItemStack is = inv.getStackInSlot( 3 );

      if ( is == null )
      {
        InscriberRecipe ir = inv.getTask();
        if ( ir != null )
          is = ir.output.copy();
      }

      renderItem( is, 0.0f, block, tile, tess, x, y, z, f, renderer );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.