sanitize BC API versions, add IIntegrationRecipe documentation

This commit is contained in:
Adrian 2015-06-01 11:19:17 +02:00
parent 4eaf4bb2b2
commit eba927e4af
7 changed files with 50 additions and 6 deletions

View file

@ -6,7 +6,7 @@
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
@API(apiVersion = "1.2", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|blueprints")
@API(apiVersion = "1.3", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|blueprints")
package buildcraft.api.blueprints;
import cpw.mods.fml.common.API;

View file

@ -6,7 +6,7 @@
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
@API(apiVersion = "1.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|boards")
@API(apiVersion = "2.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|boards")
package buildcraft.api.boards;
import cpw.mods.fml.common.API;

View file

@ -13,15 +13,59 @@ import java.util.List;
import net.minecraft.item.ItemStack;
public interface IIntegrationRecipe {
/**
* Get the energy cost (in RF) of the recipe.
* @return The energy cost of the recipe.
*/
int getEnergyCost();
/**
* Get a list of example inputs. This is used for recipe preview.
* @return A list of example inputs.
*/
List<ItemStack> getExampleInput();
/**
* Get a list of example expansions. This is used for recipe preview.
* If the amount of lists of expansions is smaller than the maximum
* expansion count, the lists will be repeated.
* @return A list of every slot's list of example expansions.
*/
List<List<ItemStack>> getExampleExpansions();
/**
* Get a list of example outputs. This is used for recipe preview.
* @return A list of example outputs.
*/
List<ItemStack> getExampleOutput();
/**
* Check if an input is valid.
* @param input The input.
* @return Whether the input is valid.
*/
boolean isValidInput(ItemStack input);
/**
* Check if an expansion is valid.
* @param input The input currently in.
* @param expansion The expansion.
* @return Whether the expansion can be fitted to a given input.
*/
boolean isValidExpansion(ItemStack input, ItemStack expansion);
/**
* Craft the recipe. Keep in mind that you need to decrease the amount of
* expansions yourself - the amount of inputs is decreased for you.
* @param input The input.
* @param expansions All inserted expansions.
* @param preview If true, do not decrease the amount of expansions.
* @return The output stack.
*/
ItemStack craft(ItemStack input, List<ItemStack> expansions, boolean preview);
/**
* Returns the maximum count of expansions this recipe can have.
* @return -1 for no limit, a different number otherwise
*/
int getMaximumExpansionCount(ItemStack input);

View file

@ -6,7 +6,7 @@
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
@API(apiVersion = "2.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|recipes")
@API(apiVersion = "3.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|recipes")
package buildcraft.api.recipes;
import cpw.mods.fml.common.API;

View file

@ -6,7 +6,7 @@
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
@API(apiVersion = "1.2", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|robotics")
@API(apiVersion = "2.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|robotics")
package buildcraft.api.robots;
import cpw.mods.fml.common.API;

View file

@ -14,7 +14,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public interface IStripesHandler {
public static enum StripesHandlerType {
enum StripesHandlerType {
ITEM_USE,
BLOCK_BREAK
}

View file

@ -6,7 +6,7 @@
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
@API(apiVersion = "4.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|transport")
@API(apiVersion = "4.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|transport")
package buildcraft.api.transport;
import cpw.mods.fml.common.API;