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(net.minecraft.world.item.ItemStack, net.minecraft.world.level.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

      GenericStack[] getOutputs()
      The outputs of this pattern. The return array or any of its stacks must never be edited.
    • 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.