Package appeng.api.crafting
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionReturn the type of the encoded item of this pattern, containing all the data to retrieve the pattern later fromPatternDetailsHelper.decodePattern(net.minecraft.world.item.ItemStack, net.minecraft.world.level.Level).The inputs of this pattern.The outputs of this pattern.default GenericStackThe primary output of this pattern.default voidpushInputsToExternalInventory(KeyCounter[] inputHolder, IPatternDetails.PatternInputSink inputSink) Gives the pattern a chance to reorder its inputs for pushing to external inventories (i.e.
-
Method Details
-
getDefinition
AEItemKey getDefinition()Return the type of the encoded item of this pattern, containing all the data to retrieve the pattern later fromPatternDetailsHelper.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
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 toICraftingMachines).- Parameters:
inputHolder- For eachIPatternDetails.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.
-