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 interface
static 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(appeng.api.stacks.AEItemKey, net.minecraft.world.level.Level)
.The inputs of this pattern.The outputs of this pattern.default GenericStack
The primary output of this pattern.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.default void
pushInputsToExternalInventory
(KeyCounter[] inputHolder, IPatternDetails.PatternInputSink inputSink) Gives the pattern a chance to reorder its inputs for pushing to external inventories (i.e.default boolean
-
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(appeng.api.stacks.AEItemKey, 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
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(appeng.api.crafting.IPatternDetails, appeng.api.stacks.KeyCounter[], net.minecraft.core.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 toICraftingMachine
s).- 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.
-
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.
-