O - The type of crafting option.I - The type of crafting plan identifier.public interface ITerminalStorageTabIngredientCraftingHandler<O extends ITerminalCraftingOption<?>,I>
| Modifier and Type | Method and Description |
|---|---|
ITerminalCraftingPlan<I> |
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,
I craftingJobId)
Cancel the crafting job with the given id.
|
I |
deserializeCraftingJobId(net.minecraft.nbt.NBTBase tag)
Deserialize a crafting job id.
|
<T,M> O |
deserializeCraftingOption(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> ingredientComponent,
net.minecraft.nbt.NBTTagCompound tag)
Deserialize a crafting option from NBT.
|
default ITerminalCraftingPlan<I> |
deserializeCraftingPlan(net.minecraft.nbt.NBTTagCompound tag)
Deserialize a crafting plan from NBT.
|
<T,M> int[] |
getChannels(TerminalStorageTabIngredientComponentServer<T,M> tab) |
ITerminalCraftingPlan<I> |
getCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
I craftingJobId)
Get the crafting job with the given id.
|
java.util.List<ITerminalCraftingPlan<I>> |
getCraftingJobs(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel) |
<T,M> java.util.Collection<O> |
getCraftingOptions(TerminalStorageTabIngredientComponentServer<T,M> tab,
int channel)
Get all crafting options in the given tab.
|
net.minecraft.util.ResourceLocation |
getId() |
net.minecraft.nbt.NBTBase |
serializeCraftingJobId(I id)
Serializes a crafting job id.
|
net.minecraft.nbt.NBTTagCompound |
serializeCraftingOption(O craftingOption)
Serialize a crafting option to NBT.
|
default net.minecraft.nbt.NBTTagCompound |
serializeCraftingPlan(ITerminalCraftingPlan<I> craftingPlan)
Serialize a crafting plan to NBT.
|
void |
startCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
ITerminalCraftingPlan<I> craftingPlan,
net.minecraft.entity.player.EntityPlayerMP player)
Start a crafting job.
|
net.minecraft.util.ResourceLocation getId()
<T,M> int[] getChannels(TerminalStorageTabIngredientComponentServer<T,M> tab)
T - The instance type.M - The matching condition parameter.tab - An ingredient tab.<T,M> java.util.Collection<O> getCraftingOptions(TerminalStorageTabIngredientComponentServer<T,M> tab, int channel)
T - The instance type.M - The matching condition parameter.tab - An ingredient tab.channel - The channel to get the options for.net.minecraft.nbt.NBTTagCompound serializeCraftingOption(O craftingOption)
craftingOption - A crafting option.<T,M> O deserializeCraftingOption(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> ingredientComponent, net.minecraft.nbt.NBTTagCompound tag) throws java.lang.IllegalArgumentException
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.ITerminalCraftingPlan<I> calculateCraftingPlan(org.cyclops.integrateddynamics.api.network.INetwork network, int channel, ITerminalCraftingOption craftingOption, long quantity)
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.default net.minecraft.nbt.NBTTagCompound serializeCraftingPlan(ITerminalCraftingPlan<I> craftingPlan)
craftingPlan - A crafting plan.default ITerminalCraftingPlan<I> deserializeCraftingPlan(net.minecraft.nbt.NBTTagCompound tag) throws java.lang.IllegalArgumentException
tag - An NBT tag representing a crafting plan.java.lang.IllegalArgumentException - If the given tag was invalid.net.minecraft.nbt.NBTBase serializeCraftingJobId(I id)
id - An id.I deserializeCraftingJobId(net.minecraft.nbt.NBTBase tag)
tag - An NBT tag.void startCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
ITerminalCraftingPlan<I> craftingPlan,
net.minecraft.entity.player.EntityPlayerMP player)
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.java.util.List<ITerminalCraftingPlan<I>> getCraftingJobs(org.cyclops.integrateddynamics.api.network.INetwork network, int channel)
network - The network in which the plan should be started.channel - The channel to get the options for.@Nullable ITerminalCraftingPlan<I> getCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network, int channel, I craftingJobId)
network - The network in which the plan should be started.channel - The channel to get the options for.craftingJobId - A crafting job id.boolean cancelCraftingJob(org.cyclops.integrateddynamics.api.network.INetwork network,
int channel,
I craftingJobId)
network - The network in which the plan should be started.channel - The channel to get the options for.craftingJobId - A crafting job id.