public class TerminalStorageTabIngredientCraftingHandlerCraftingNetwork extends java.lang.Object implements ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>
ITerminalStorageTabIngredientCraftingHandler implementation for
ICraftingNetwork.| Constructor and Description |
|---|
TerminalStorageTabIngredientCraftingHandlerCraftingNetwork() |
| Modifier and Type | Method and Description |
|---|---|
ITerminalCraftingPlan<java.lang.Integer> |
calculateCraftingPlan(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
ITerminalCraftingOption craftingOption,
long quantity)
Calculate a crafting plan for the given crafting option.
|
boolean |
cancelCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
java.lang.Integer craftingJobId)
Cancel the crafting job with the given id.
|
java.lang.Integer |
deserializeCraftingJobId(net.minecraft.nbt.NBTBase tag)
Deserialize a crafting job id.
|
<T,M> TerminalCraftingOptionRecipeDefinition |
deserializeCraftingOption(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> ingredientComponent,
net.minecraft.nbt.NBTTagCompound tag)
Deserialize a crafting option from NBT.
|
ITerminalCraftingPlan<java.lang.Integer> |
deserializeCraftingPlan(net.minecraft.nbt.NBTTagCompound tag)
Deserialize a crafting plan from NBT.
|
<T,M> int[] |
getChannels(TerminalStorageTabIngredientComponentServer<T,M> tab) |
ITerminalCraftingPlan<java.lang.Integer> |
getCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
java.lang.Integer craftingJobId)
Get the crafting job with the given id.
|
java.util.List<ITerminalCraftingPlan<java.lang.Integer>> |
getCraftingJobs(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel) |
<T,M> java.util.Collection<TerminalCraftingOptionRecipeDefinition<?,?>> |
getCraftingOptions(TerminalStorageTabIngredientComponentServer<T,M> tab,
int channel)
Get all crafting options in the given tab.
|
net.minecraft.util.ResourceLocation |
getId() |
protected org.cyclops.integratedcrafting.api.recipe.IRecipeIndex |
getRecipeIndex(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel) |
protected static ITerminalCraftingPlan<java.lang.Integer> |
newActiveCraftingJob(org.cyclops.integratedcrafting.api.network.ICraftingNetwork craftingNetwork,
int channel,
org.cyclops.integratedcrafting.api.crafting.CraftingJob craftingJob,
org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph) |
protected static ITerminalCraftingPlan<java.lang.Integer> |
newCraftingPlan(org.cyclops.integratedcrafting.api.crafting.CraftingJob craftingJob,
org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph,
boolean root) |
protected static ITerminalCraftingPlan<java.lang.Integer> |
newCraftingPlanErrorRecursive(java.util.List<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> childRecipes) |
protected static ITerminalCraftingPlan<java.lang.Integer> |
newCraftingPlanFailed(org.cyclops.integratedcrafting.api.crafting.FailedCraftingRecipeException exception,
org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph) |
protected static ITerminalCraftingPlan<java.lang.Integer> |
newCraftingPlanUnknown(org.cyclops.integratedcrafting.api.crafting.UnknownCraftingRecipeException exception,
org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph) |
protected static ITerminalCraftingPlan<java.lang.Integer> |
newErroredCraftingJob() |
net.minecraft.nbt.NBTBase |
serializeCraftingJobId(java.lang.Integer id)
Serializes a crafting job id.
|
net.minecraft.nbt.NBTTagCompound |
serializeCraftingOption(TerminalCraftingOptionRecipeDefinition craftingOption)
Serialize a crafting option to NBT.
|
net.minecraft.nbt.NBTTagCompound |
serializeCraftingPlan(ITerminalCraftingPlan<java.lang.Integer> craftingPlan)
Serialize a crafting plan to NBT.
|
void |
startCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
ITerminalCraftingPlan<java.lang.Integer> craftingPlan,
net.minecraft.entity.player.EntityPlayerMP player)
Start a crafting job.
|
protected static java.lang.String |
uuidToName(java.lang.String uuid) |
public TerminalStorageTabIngredientCraftingHandlerCraftingNetwork()
protected org.cyclops.integratedcrafting.api.recipe.IRecipeIndex getRecipeIndex(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel)
public net.minecraft.util.ResourceLocation getId()
getId in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>public <T,M> int[] getChannels(TerminalStorageTabIngredientComponentServer<T,M> tab)
getChannels in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>T - The instance type.M - The matching condition parameter.tab - An ingredient tab.public <T,M> java.util.Collection<TerminalCraftingOptionRecipeDefinition<?,?>> getCraftingOptions(TerminalStorageTabIngredientComponentServer<T,M> tab, int channel)
ITerminalStorageTabIngredientCraftingHandlergetCraftingOptions in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>T - The instance type.M - The matching condition parameter.tab - An ingredient tab.channel - The channel to get the options for.public net.minecraft.nbt.NBTTagCompound serializeCraftingOption(TerminalCraftingOptionRecipeDefinition craftingOption)
ITerminalStorageTabIngredientCraftingHandlerserializeCraftingOption in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>craftingOption - A crafting option.public <T,M> TerminalCraftingOptionRecipeDefinition deserializeCraftingOption(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> ingredientComponent, net.minecraft.nbt.NBTTagCompound tag) throws java.lang.IllegalArgumentException
ITerminalStorageTabIngredientCraftingHandlerdeserializeCraftingOption in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>T - The instance type.M - The matching condition parameter.ingredientComponent - The ingredient component for the crafting option.tag - An NBT tag representing a crafting option.java.lang.IllegalArgumentException - If the given tag was invalid.public ITerminalCraftingPlan<java.lang.Integer> calculateCraftingPlan(org.cyclops.integrateddynamics.api.network.INetwork network, int channel, ITerminalCraftingOption craftingOption, long quantity)
ITerminalStorageTabIngredientCraftingHandlercalculateCraftingPlan in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>network - The network in which the plan should be calculated.channel - The channel to get the options for.craftingOption - A crafting option.quantity - The requested output quantity.protected static ITerminalCraftingPlan<java.lang.Integer> newCraftingPlan(org.cyclops.integratedcrafting.api.crafting.CraftingJob craftingJob, org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph, boolean root)
protected static ITerminalCraftingPlan<java.lang.Integer> newCraftingPlanUnknown(org.cyclops.integratedcrafting.api.crafting.UnknownCraftingRecipeException exception, org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph)
protected static ITerminalCraftingPlan<java.lang.Integer> newCraftingPlanFailed(org.cyclops.integratedcrafting.api.crafting.FailedCraftingRecipeException exception, org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph)
protected static ITerminalCraftingPlan<java.lang.Integer> newCraftingPlanErrorRecursive(java.util.List<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> childRecipes)
public void startCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
ITerminalCraftingPlan<java.lang.Integer> craftingPlan,
net.minecraft.entity.player.EntityPlayerMP player)
ITerminalStorageTabIngredientCraftingHandlerstartCraftingJob in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>network - The network in which the plan should be started.channel - The channel to get the options for.craftingPlan - A crafting plan.player - The player that started the crafting job.protected static ITerminalCraftingPlan<java.lang.Integer> newErroredCraftingJob()
protected static ITerminalCraftingPlan<java.lang.Integer> newActiveCraftingJob(org.cyclops.integratedcrafting.api.network.ICraftingNetwork craftingNetwork, int channel, org.cyclops.integratedcrafting.api.crafting.CraftingJob craftingJob, org.cyclops.integratedcrafting.api.crafting.CraftingJobDependencyGraph dependencyGraph)
@Nullable
protected static java.lang.String uuidToName(@Nullable
java.lang.String uuid)
public java.util.List<ITerminalCraftingPlan<java.lang.Integer>> getCraftingJobs(org.cyclops.integrateddynamics.api.network.INetwork network, int channel)
getCraftingJobs in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>network - The network in which the plan should be started.channel - The channel to get the options for.@Nullable public ITerminalCraftingPlan<java.lang.Integer> getCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network, int channel, java.lang.Integer craftingJobId)
ITerminalStorageTabIngredientCraftingHandlergetCraftingJob in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>network - The network in which the plan should be started.channel - The channel to get the options for.craftingJobId - A crafting job id.public boolean cancelCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
java.lang.Integer craftingJobId)
ITerminalStorageTabIngredientCraftingHandlercancelCraftingJob in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>network - The network in which the plan should be started.channel - The channel to get the options for.craftingJobId - A crafting job id.public net.minecraft.nbt.NBTTagCompound serializeCraftingPlan(ITerminalCraftingPlan<java.lang.Integer> craftingPlan)
ITerminalStorageTabIngredientCraftingHandlerserializeCraftingPlan in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>craftingPlan - A crafting plan.public ITerminalCraftingPlan<java.lang.Integer> deserializeCraftingPlan(net.minecraft.nbt.NBTTagCompound tag) throws java.lang.IllegalArgumentException
ITerminalStorageTabIngredientCraftingHandlerdeserializeCraftingPlan in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>tag - An NBT tag representing a crafting plan.java.lang.IllegalArgumentException - If the given tag was invalid.public net.minecraft.nbt.NBTBase serializeCraftingJobId(java.lang.Integer id)
ITerminalStorageTabIngredientCraftingHandlerserializeCraftingJobId in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>id - An id.public java.lang.Integer deserializeCraftingJobId(net.minecraft.nbt.NBTBase tag)
ITerminalStorageTabIngredientCraftingHandlerdeserializeCraftingJobId in interface ITerminalStorageTabIngredientCraftingHandler<TerminalCraftingOptionRecipeDefinition<?,?>,java.lang.Integer>tag - An NBT tag.