public class CraftingJobIndexDefault extends java.lang.Object implements ICraftingJobIndexModifiable
ICraftingJobIndex and ICraftingJobIndexModifiable.| Constructor and Description |
|---|
CraftingJobIndexDefault() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCraftingJob(CraftingJob craftingJob)
Add the given crafting job to this index.
|
protected <T,M> void |
addCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Collection<CraftingJob>> index,
CraftingJob craftingJob) |
CraftingJob |
getCraftingJob(int craftingJobId)
Get the crafting job with the given id.
|
java.util.Collection<CraftingJob> |
getCraftingJobs() |
<T,M> java.util.Iterator<CraftingJob> |
getCraftingJobs(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> outputType,
T output,
M matchCondition)
Find crafting jobs with the given output.
|
protected <T,M> org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Collection<CraftingJob>> |
initializeIndex(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> recipeComponent) |
void |
removeCraftingJob(CraftingJob craftingJob)
Remove the given crafting job from this index.
|
protected <T,M> void |
removeCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Collection<CraftingJob>> index,
CraftingJob craftingJob) |
public java.util.Collection<CraftingJob> getCraftingJobs()
getCraftingJobs in interface ICraftingJobIndexpublic <T,M> java.util.Iterator<CraftingJob> getCraftingJobs(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> outputType, T output, M matchCondition)
ICraftingJobIndexgetCraftingJobs in interface ICraftingJobIndexT - The instance type.M - The matching condition parameter, may be Void.outputType - The recipe component type.output - An output ingredient instance.matchCondition - A condition under which the matching should be done.@Nullable public CraftingJob getCraftingJob(int craftingJobId)
ICraftingJobIndexgetCraftingJob in interface ICraftingJobIndexcraftingJobId - A crafting job id.@Nullable protected <T,M> org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Collection<CraftingJob>> initializeIndex(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> recipeComponent)
public void addCraftingJob(CraftingJob craftingJob)
ICraftingJobIndexModifiableaddCraftingJob in interface ICraftingJobIndexModifiablecraftingJob - A crafting job.protected <T,M> void addCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Collection<CraftingJob>> index, CraftingJob craftingJob)
public void removeCraftingJob(CraftingJob craftingJob)
ICraftingJobIndexModifiableremoveCraftingJob in interface ICraftingJobIndexModifiablecraftingJob - A crafting job.protected <T,M> void removeCraftingJobForComponent(org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable<T,M,java.util.Collection<CraftingJob>> index, CraftingJob craftingJob)