Interface ICraftingProvider

All Superinterfaces:
IGridNodeService

public interface ICraftingProvider extends IGridNodeService
Allows a node to provide crafting patterns and emitable items to the network.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the patterns offered by this provider.
    default Set<AEKey>
    Return the emitable items offered by this provider.
    default int
    Return the priority for the patterns offered by this provider.
    boolean
     
    boolean
    pushPattern(IPatternDetails patternDetails, KeyCounter[] inputHolder)
    Instruct a provider to craft one of the patterns.
    static void
    This convenience method can be used when the crafting options or emitable items have changed to request an update of the crafting service's cache.This only works if the given managed grid node provides this service.
  • Method Details

    • getAvailablePatterns

      List<IPatternDetails> getAvailablePatterns()
      Return the patterns offered by this provider. pushPattern(appeng.api.crafting.IPatternDetails, appeng.api.stacks.KeyCounter[]) will be called if they need to be crafted.
    • getPatternPriority

      default int getPatternPriority()
      Return the priority for the patterns offered by this provider. The crafting calculation will prioritize patterns with the highest priority.
    • pushPattern

      boolean pushPattern(IPatternDetails patternDetails, KeyCounter[] inputHolder)
      Instruct a provider to craft one of the patterns.
      Parameters:
      patternDetails - details
      inputHolder - the requested stacks, for each input slot of the pattern
      Returns:
      if the pattern was successfully pushed.
    • isBusy

      boolean isBusy()
      Returns:
      if this is true, the crafting engine will refuse to send patterns to this provider.
    • getEmitableItems

      default Set<AEKey> getEmitableItems()
      Return the emitable items offered by this provider. They should be crafted and inserted into the network when ICraftingService.isRequesting(appeng.api.stacks.AEKey) is true.
    • requestUpdate

      static void requestUpdate(IManagedGridNode managedNode)
      This convenience method can be used when the crafting options or emitable items have changed to request an update of the crafting service's cache.This only works if the given managed grid node provides this service.