2013-04-19 21:43:00 +02:00
|
|
|
package ic2.api.recipe;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
2013-08-22 17:36:31 +02:00
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
2013-04-19 21:43:00 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Recipe manager interface for basic machines.
|
|
|
|
*
|
2013-08-22 17:36:31 +02:00
|
|
|
* @author RichardG, Player
|
2013-04-19 21:43:00 +02:00
|
|
|
*/
|
2013-08-22 17:36:31 +02:00
|
|
|
public interface IMachineRecipeManager {
|
2013-04-19 21:43:00 +02:00
|
|
|
/**
|
|
|
|
* Adds a recipe to the machine.
|
|
|
|
*
|
|
|
|
* @param input Recipe input
|
2013-08-22 17:36:31 +02:00
|
|
|
* @param metadata meta data for additional recipe properties, may be null
|
|
|
|
* @param outputs Recipe outputs, zero or more depending on the machine
|
2013-11-01 03:46:16 +01:00
|
|
|
*
|
|
|
|
* For the thermal centrifuge @param metadata meta data {"minHeat": 1-xxx}
|
|
|
|
* For the ore washing plant @param metadata meta data {"amount": 1-8000}
|
|
|
|
*
|
2013-04-19 21:43:00 +02:00
|
|
|
*/
|
2013-08-30 00:57:13 +02:00
|
|
|
public void addRecipe(IRecipeInput input, NBTTagCompound metadata, ItemStack... outputs);
|
2013-08-22 17:36:31 +02:00
|
|
|
|
2013-04-19 21:43:00 +02:00
|
|
|
/**
|
|
|
|
* Gets the recipe output for the given input.
|
|
|
|
*
|
|
|
|
* @param input Recipe input
|
2013-09-28 03:54:01 +02:00
|
|
|
* @param adjustInput modify the input according to the recipe's requirements
|
2013-04-19 21:43:00 +02:00
|
|
|
* @return Recipe output, or null if none
|
|
|
|
*/
|
2013-08-22 17:36:31 +02:00
|
|
|
public RecipeOutput getOutputFor(ItemStack input, boolean adjustInput);
|
|
|
|
|
2013-04-19 21:43:00 +02:00
|
|
|
/**
|
|
|
|
* Gets a list of recipes.
|
|
|
|
*
|
2013-05-07 22:12:07 +02:00
|
|
|
* You're a mad evil scientist if you ever modify this.
|
|
|
|
*
|
|
|
|
* @return List of recipes
|
2013-04-19 21:43:00 +02:00
|
|
|
*/
|
2013-08-30 00:57:13 +02:00
|
|
|
public Map<IRecipeInput, RecipeOutput> getRecipes();
|
2013-04-19 21:43:00 +02:00
|
|
|
}
|