Interface IPatternDetails


public interface IPatternDetails
Information about a pattern for use by the autocrafting system.

Implementing classes need to properly implement equals/hashCode for crafting jobs to resume properly after world or chunk reloads.

  • Method Details

    • getDefinition

      AEItemKey getDefinition()
      Return the type of the encoded item of this pattern, containing all the data to retrieve the pattern later from PatternDetailsHelper.decodePattern(AEItemKey, Level).
    • getInputs

      IPatternDetails.IInput[] getInputs()
      The inputs of this pattern. The return array must never be edited.
    • getPrimaryOutput

      default GenericStack getPrimaryOutput()
      The primary output of this pattern. The pattern will only be used to craft the primary output; the others are just byproducts.
    • getOutputs

      List<GenericStack> getOutputs()
      The outputs of this pattern.
    • supportsPushInputsToExternalInventory

      default boolean supportsPushInputsToExternalInventory()
      Returns:
      True if this pattern allows its inputs to be pushed to generic external inventories that would accept those inputs. This would usually be true for custom processing patterns, but not true for patterns that require custom machines or molecular assemblers (since those are pushed via ICraftingMachine.pushPattern(IPatternDetails, KeyCounter[], Direction)).
    • pushInputsToExternalInventory

      default void pushInputsToExternalInventory(KeyCounter[] inputHolder, IPatternDetails.PatternInputSink inputSink)
      Gives the pattern a chance to reorder its inputs for pushing to external inventories (i.e. NOT to ICraftingMachines).
      Parameters:
      inputHolder - For each IPatternDetails.IInput, the relevant items. The ownership is given to the pattern, do whatever with the key counters as long as all of their contents end up in the input sink.
      inputSink - Where to push the inputs to.
    • getTooltip

      default PatternDetailsTooltip getTooltip(net.minecraft.world.level.Level level, net.minecraft.world.item.TooltipFlag flags)
      Gets a tooltip describing the details of this crafting pattern.