Interface ICraftingInterface
- All Known Implementing Classes:
PartTypeInterfaceCrafting.State,PartTypeInterfaceCraftingAttuned.State,PartTypeInterfaceCraftingBase.State
public interface ICraftingInterface
A handler for invoking crafting recipes.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelCraftingJob(int channel, int craftingJobId) Cancel the given crafting job.booleanstatic Comparator<ICraftingInterface>voidfillCraftingJobBufferFromStorage(CraftingJob craftingJob, Function<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?>, org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage> storageGetter) Extract the required ingredients from storage and store them in the job.intgetCraftingJobStatus(ICraftingNetwork network, int channel, int craftingJobId) Get the status for the given crafting job.List<Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>, List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>>>> getPendingCraftingJobOutputs(int craftingJobId) Get the pending outputs for the given crafting job, where the list indicates the different entries running in parallel.org.cyclops.integrateddynamics.api.part.PrioritizedPartPosCollection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>voidscheduleCraftingJob(CraftingJob craftingJob) Add the given crafting job to the list of crafting jobs.
-
Method Details
-
getRecipes
Collection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> getRecipes()- Returns:
- The collection of recipes that is exposed by this crafting interface.
-
canScheduleCraftingJobs
boolean canScheduleCraftingJobs()- Returns:
- If this crafting interface can currently accept crafting jobs.
-
scheduleCraftingJob
Add the given crafting job to the list of crafting jobs.- Parameters:
craftingJob- The crafting job.
-
fillCraftingJobBufferFromStorage
void fillCraftingJobBufferFromStorage(CraftingJob craftingJob, Function<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?>, org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage> storageGetter) Extract the required ingredients from storage and store them in the job.- Parameters:
craftingJob- The crafting job.storageGetter- The storage getter.
-
getCraftingJobsCount
int getCraftingJobsCount()- Returns:
- Get the number of scheduled and running crafting jobs in this interface.
-
getCraftingJobs
Iterator<CraftingJob> getCraftingJobs()- Returns:
- Get the scheduled and running crafting jobs in this interface.
-
getPendingCraftingJobOutputs
List<Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>, getPendingCraftingJobOutputsList<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<?, ?>>>> (int craftingJobId) Get the pending outputs for the given crafting job, where the list indicates the different entries running in parallel.- Parameters:
craftingJobId- A crafting job id.- Returns:
- A collection of all pending prototype-based ingredients.
-
getCraftingJobStatus
Get the status for the given crafting job.- Parameters:
network- The network.channel- The channel.craftingJobId- A crafting job id.- Returns:
- The crafting status.
-
cancelCraftingJob
void cancelCraftingJob(int channel, int craftingJobId) Cancel the given crafting job. Note: this should not be called directly unless you know what you are doing! Instead, you should callICraftingNetwork.cancelCraftingJob(int, int).- Parameters:
channel- The channel.craftingJobId- A crafting job id.
-
getPosition
org.cyclops.integrateddynamics.api.part.PrioritizedPartPos getPosition()- Returns:
- The prioritized position of this interface.
-
createComparator
-