Class TerminalCraftingPlanStatic<I>
java.lang.Object
org.cyclops.integratedterminals.api.terminalstorage.crafting.TerminalCraftingPlanStatic<I>
- All Implemented Interfaces:
ITerminalCraftingPlan<I>
- Direct Known Subclasses:
TerminalCraftingPlanCraftingJobDependencyGraph
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionTerminalCraftingPlanStatic(I id, List<ITerminalCraftingPlan<I>> dependencies, List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>> outputs, TerminalCraftingJobStatus status, long craftingQuantity, List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>> storageIngredients, List<List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>>> lastMissingIngredients, TerminalCraftingPlanStatic.Label label, long tickDuration, int channel, String initiatorName) -
Method Summary
Modifier and TypeMethodDescriptionstatic <I> TerminalCraftingPlanStatic<I>deserialize(net.minecraft.nbt.CompoundTag tag, ITerminalStorageTabIngredientCraftingHandler<?, I> handler) flatten()intlonggetId()getLabel()List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?,?>> List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?,?>> longprotected static <I> voidgroupDependenciesByPrototype(TerminalCraftingPlanStatic.IndexedEntries indexedEntries, ITerminalCraftingPlan<I> plan) static <I> net.minecraft.nbt.CompoundTagserialize(TerminalCraftingPlanStatic<I> plan, ITerminalStorageTabIngredientCraftingHandler<?, I> handler) voidMark this plan as errored.voidsetUnlocalizedLabelOverride(String unlocalizedLabelOverride)
-
Constructor Details
-
TerminalCraftingPlanStatic
public TerminalCraftingPlanStatic(I id, List<ITerminalCraftingPlan<I>> dependencies, List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>> outputs, TerminalCraftingJobStatus status, long craftingQuantity, List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>> storageIngredients, List<List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>>> lastMissingIngredients, TerminalCraftingPlanStatic.Label label, long tickDuration, int channel, @Nullable String initiatorName)
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceITerminalCraftingPlan<I>- Returns:
- The unique id of this plan.
-
getDependencies
- Specified by:
getDependenciesin interfaceITerminalCraftingPlan<I>- Returns:
- The dependencies of this job.
-
getOutputs
- Specified by:
getOutputsin interfaceITerminalCraftingPlan<I>- Returns:
- The output instances of this job.
-
getStatus
- Specified by:
getStatusin interfaceITerminalCraftingPlan<I>- Returns:
- The job status.
-
getCraftingQuantity
public long getCraftingQuantity()- Specified by:
getCraftingQuantityin interfaceITerminalCraftingPlan<I>- Returns:
- The number of instances that will be crafted.. (These are expected to become available later on because of a dependency job)
-
getStorageIngredients
public List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?,?>> getStorageIngredients()- Specified by:
getStorageIngredientsin interfaceITerminalCraftingPlan<I>- Returns:
- The ingredients that will be used from storage.
-
getLastMissingIngredients
public List<List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?,?>>> getLastMissingIngredients()- Specified by:
getLastMissingIngredientsin interfaceITerminalCraftingPlan<I>- Returns:
- The ingredients that were missing for 1 job amount.
This should contain something when the status is
TerminalCraftingJobStatus.PENDING_INPUTS. The inner list represents alternatives.
-
getLabel
-
getUnlocalizedLabelOverride
-
setUnlocalizedLabelOverride
-
getUnlocalizedLabel
- Specified by:
getUnlocalizedLabelin interfaceITerminalCraftingPlan<I>- Returns:
- A visual label for this plan, such as an error or plan type.
-
getTickDuration
public long getTickDuration()- Specified by:
getTickDurationin interfaceITerminalCraftingPlan<I>- Returns:
- The tick duration for this job. -1 indicates no duration.
-
getChannel
public int getChannel()- Specified by:
getChannelin interfaceITerminalCraftingPlan<I>- Returns:
- The channel id, or -1 for non-applicable.
-
getInitiatorName
- Specified by:
getInitiatorNamein interfaceITerminalCraftingPlan<I>- Returns:
- The initiator name of the crafting job.
-
setError
Description copied from interface:ITerminalCraftingPlanMark this plan as errored.- Specified by:
setErrorin interfaceITerminalCraftingPlan<I>- Parameters:
unlocalizedError- An unlocalized error message.
-
flatten
- Specified by:
flattenin interfaceITerminalCraftingPlan<I>- Returns:
- A flattened copy of this plan.
-
groupDependenciesByPrototype
protected static <I> void groupDependenciesByPrototype(TerminalCraftingPlanStatic.IndexedEntries indexedEntries, ITerminalCraftingPlan<I> plan) -
serialize
public static <I> net.minecraft.nbt.CompoundTag serialize(TerminalCraftingPlanStatic<I> plan, ITerminalStorageTabIngredientCraftingHandler<?, I> handler) -
deserialize
public static <I> TerminalCraftingPlanStatic<I> deserialize(net.minecraft.nbt.CompoundTag tag, ITerminalStorageTabIngredientCraftingHandler<?, I> handler)
-