Mekanism-tilera-Edition/common/ic2/api/recipe/ICannerEnrichRecipeManager.java
Ben Spiers 7f4a603f64 Update ic2 API. AGAIN
Conflicts:
	common/mekanism/common/Mekanism.java
	common/mekanism/common/MekanismHooks.java
2013-09-28 03:20:43 +01:00

54 lines
1.5 KiB
Java

package ic2.api.recipe;
import java.util.Map;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public interface ICannerEnrichRecipeManager {
/**
* Adds a recipe to the machine.
*
* @param input Fluid input
* @param additive Item to enrich the fluid with
* @param output Output fluid
*/
public void addRecipe(FluidStack input, IRecipeInput additive, FluidStack output);
/**
* Gets the recipe output for the given input.
*
* @param input Fluid input
* @param additive Item to enrich the fluid with
* @param adjustInput modify the input according to the recipe's requirements
* @param acceptTest allow input or additive to be null to see if either of them is part of a recipe
* @return Recipe output, or null if none, output fluid in nbt
*/
public RecipeOutput getOutputFor(FluidStack input, ItemStack additive, boolean adjustInput, boolean acceptTest);
/**
* Gets a list of recipes.
*
* You're a mad evil scientist if you ever modify this.
*
* @return List of recipes
*/
public Map<Input, FluidStack> getRecipes();
public static class Input {
public Input(FluidStack fluid, IRecipeInput additive) {
this.fluid = fluid;
this.additive = additive;
}
public boolean matches(FluidStack fluid, ItemStack additive) {
return (this.fluid == null || this.fluid.isFluidEqual(fluid)) &&
this.additive.matches(additive);
}
public final FluidStack fluid;
public final IRecipeInput additive;
}
}