Test with stuff + Forestry potential support
This commit is contained in:
parent
5b05cf651b
commit
bd26e441cb
174 changed files with 5602 additions and 0 deletions
34
BM_src/forestry/api/recipes/IBottlerManager.java
Normal file
34
BM_src/forestry/api/recipes/IBottlerManager.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
/**
|
||||
* Provides an interface to the recipe manager of the bottler.
|
||||
*
|
||||
* The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
|
||||
* if your mod loads before Forestry.
|
||||
*
|
||||
* Accessible via {@link RecipeManagers}
|
||||
*
|
||||
* Note that this is untested with anything other than biofuel->fuelcan conversion.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IBottlerManager extends ICraftingProvider {
|
||||
/**
|
||||
* Add a recipe to the bottler.
|
||||
* The bottler will populate its recipe list dynamically from the LiquidContainerRegistry. Recipes added explicitely will take precedence.
|
||||
*
|
||||
* @param cyclesPerUnit
|
||||
* Amount of work cycles required to run through the conversion once.
|
||||
* @param input
|
||||
* LiquidStack representing the input liquid.
|
||||
* @param can
|
||||
* ItemStack representing the cans, capsules and/or cells required
|
||||
* @param bottled
|
||||
* ItemStack representing the finished product
|
||||
*/
|
||||
@Deprecated
|
||||
public void addRecipe(int cyclesPerUnit, FluidStack input, ItemStack can, ItemStack bottled);
|
||||
}
|
65
BM_src/forestry/api/recipes/ICarpenterManager.java
Normal file
65
BM_src/forestry/api/recipes/ICarpenterManager.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
/**
|
||||
* Provides an interface to the recipe manager of the carpenter.
|
||||
*
|
||||
* The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
|
||||
* if your mod loads before Forestry.
|
||||
*
|
||||
* Accessible via {@link RecipeManagers}
|
||||
*
|
||||
* Only shaped recipes can be added currently.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface ICarpenterManager extends ICraftingProvider {
|
||||
/**
|
||||
* Add a shaped recipe to the carpenter.
|
||||
*
|
||||
* @param box
|
||||
* ItemStack of one item representing the required box (carton, crate) for this recipe. May be null.
|
||||
* @param product
|
||||
* Crafting result.
|
||||
* @param materials
|
||||
* Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same.
|
||||
*/
|
||||
public void addRecipe(ItemStack box, ItemStack product, Object materials[]);
|
||||
|
||||
/**
|
||||
* Add a shaped recipe to the carpenter.
|
||||
*
|
||||
* @param packagingTime
|
||||
* Number of work cycles required to craft the recipe once.
|
||||
* @param box
|
||||
* ItemStack of one item representing the required box (carton, crate) for this recipe. May be null.
|
||||
* @param product
|
||||
* Crafting result.
|
||||
* @param materials
|
||||
* Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same.
|
||||
*/
|
||||
public void addRecipe(int packagingTime, ItemStack box, ItemStack product, Object materials[]);
|
||||
|
||||
/**
|
||||
* Add a shaped recipe to the carpenter.
|
||||
*
|
||||
* @param packagingTime
|
||||
* Number of work cycles required to craft the recipe once.
|
||||
* @param liquid
|
||||
* Liquid required in carpenter's tank.
|
||||
* @param box
|
||||
* ItemStack of one item representing the required box (carton, crate) for this recipe. May be null.
|
||||
* @param product
|
||||
* Crafting result.
|
||||
* @param materials
|
||||
* Materials needed in the crafting matrix. This gets passed directly to {@link ShapedRecipes}. Notation is the same.
|
||||
*/
|
||||
public void addRecipe(int packagingTime, FluidStack liquid, ItemStack box, ItemStack product, Object materials[]);
|
||||
|
||||
public void addCrating(String toCrate, ItemStack unpack, ItemStack crated);
|
||||
|
||||
public void addCrating(ItemStack itemStack);
|
||||
}
|
74
BM_src/forestry/api/recipes/ICentrifugeManager.java
Normal file
74
BM_src/forestry/api/recipes/ICentrifugeManager.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Provides an interface to the recipe manager of the centrifuge.
|
||||
*
|
||||
* The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
|
||||
* if your mod loads before Forestry.
|
||||
*
|
||||
* Accessible via {@link RecipeManagers}
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface ICentrifugeManager extends ICraftingProvider {
|
||||
|
||||
/**
|
||||
* Add a recipe to the centrifuge
|
||||
*
|
||||
* @param timePerItem
|
||||
* Time to centrifugate one item of the given type
|
||||
* @param resource
|
||||
* ItemStack containing information on item id and damage. Stack size will be ignored.
|
||||
* @param products
|
||||
* HashMap<ItemStack, Integer> specifying the possible products and the chances of them resulting from centrifugation.
|
||||
*/
|
||||
public void addRecipe(int timePerItem, ItemStack resource, HashMap<ItemStack, Integer> products);
|
||||
|
||||
/**
|
||||
* Add a recipe to the centrifuge
|
||||
*
|
||||
* @param timePerItem
|
||||
* Time to centrifugate one item of the given type
|
||||
* @param resource
|
||||
* ItemStack containing information on item id and damage. Stack size will be ignored.
|
||||
* @param produce
|
||||
* Array of ItemStacks that can be the result of this recipe.
|
||||
* @param chances
|
||||
* Array of integers corresponding and matching to produce providing the chance (0-100) for the ItemStack at the given index to be
|
||||
* produced.
|
||||
*/
|
||||
public void addRecipe(int timePerItem, ItemStack resource, ItemStack[] produce, int[] chances);
|
||||
|
||||
/**
|
||||
* Add a recipe to the centrifuge
|
||||
*
|
||||
* @param timePerItem
|
||||
* Time to centrifugate one item of the given type
|
||||
* @param resource
|
||||
* ItemStack containing information on item id and damage. Stack size will be ignored.
|
||||
* @param primary
|
||||
* Primary product produced by centrifugating one item. Yield 100 %.
|
||||
* @param secondary
|
||||
* Secondary product that may be produced when centrifugating the given item. May be null.
|
||||
* @param chance
|
||||
* Chance (1 - 100) for centrifugation to yield the secondary product.
|
||||
*/
|
||||
public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary, ItemStack secondary, int chance);
|
||||
|
||||
/**
|
||||
* Add a recipe to the centrifuge
|
||||
*
|
||||
* @param timePerItem
|
||||
* Time to centrifugate one item of the given type
|
||||
* @param resource
|
||||
* ItemStack containing information on item id and damage. Stack size will be ignored.
|
||||
* @param primary
|
||||
* Primary product produced by centrifugating one item. Yield 100 %.
|
||||
*/
|
||||
public void addRecipe(int timePerItem, ItemStack resource, ItemStack primary);
|
||||
|
||||
}
|
12
BM_src/forestry/api/recipes/ICraftingProvider.java
Normal file
12
BM_src/forestry/api/recipes/ICraftingProvider.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ICraftingProvider {
|
||||
/**
|
||||
* Access to the full list of recipes contained in the crafting provider.
|
||||
*
|
||||
* @return List of the given format where the first array represents inputs and the second outputs. Objects can be either ItemStack or LiquidStack.
|
||||
*/
|
||||
public Map<Object[], Object[]> getRecipes();
|
||||
}
|
12
BM_src/forestry/api/recipes/IFabricatorManager.java
Normal file
12
BM_src/forestry/api/recipes/IFabricatorManager.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public interface IFabricatorManager extends ICraftingProvider {
|
||||
|
||||
void addRecipe(ItemStack plan, FluidStack molten, ItemStack result, Object[] pattern);
|
||||
|
||||
void addSmelting(ItemStack resource, FluidStack molten, int meltingPoint);
|
||||
|
||||
}
|
48
BM_src/forestry/api/recipes/IFermenterManager.java
Normal file
48
BM_src/forestry/api/recipes/IFermenterManager.java
Normal file
|
@ -0,0 +1,48 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
/**
|
||||
* Provides an interface to the recipe manager of the fermenter.
|
||||
*
|
||||
* The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
|
||||
* if your mod loads before Forestry.
|
||||
*
|
||||
* Accessible via {@link RecipeManagers}
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IFermenterManager extends ICraftingProvider {
|
||||
|
||||
/**
|
||||
* Add a recipe to the fermenter
|
||||
*
|
||||
* @param resource
|
||||
* ItemStack representing the resource.
|
||||
* @param fermentationValue
|
||||
* Value of the given resource, i.e. how much needs to be fermented for the output to be deposited into the product tank.
|
||||
* @param modifier
|
||||
* Modifies the amount of liquid output per work cycle. (water = 1.0f, honey = 1.5f)
|
||||
* @param output
|
||||
* LiquidStack representing output liquid. Amount is determined by fermentationValue*modifier.
|
||||
* @param liquid
|
||||
* LiquidStack representing resource liquid and amount.
|
||||
*/
|
||||
public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output, FluidStack liquid);
|
||||
|
||||
/**
|
||||
* Add a recipe to the fermenter. Defaults to water as input liquid.
|
||||
*
|
||||
* @param resource
|
||||
* ItemStack representing the resource.
|
||||
* @param modifier
|
||||
* Modifies the amount of liquid output per work cycle. (water = 1.0f, honey = 1.5f)
|
||||
* @param fermentationValue
|
||||
* Value of the given resource, i.e. how much needs to be fermented for the output to be deposited into the product tank.
|
||||
* @param output
|
||||
* LiquidStack representing output liquid. Amount is determined by fermentationValue*modifier.
|
||||
*/
|
||||
public void addRecipe(ItemStack resource, int fermentationValue, float modifier, FluidStack output);
|
||||
|
||||
}
|
11
BM_src/forestry/api/recipes/IGenericCrate.java
Normal file
11
BM_src/forestry/api/recipes/IGenericCrate.java
Normal file
|
@ -0,0 +1,11 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IGenericCrate {
|
||||
|
||||
void setContained(ItemStack crate, ItemStack contained);
|
||||
|
||||
ItemStack getContained(ItemStack crate);
|
||||
|
||||
}
|
28
BM_src/forestry/api/recipes/IMoistenerManager.java
Normal file
28
BM_src/forestry/api/recipes/IMoistenerManager.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Provides an interface to the recipe manager of the moistener.
|
||||
*
|
||||
* The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
|
||||
* if your mod loads before Forestry.
|
||||
*
|
||||
* Accessible via {@link RecipeManagers}
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IMoistenerManager extends ICraftingProvider {
|
||||
|
||||
/**
|
||||
* Add a recipe to the moistener
|
||||
*
|
||||
* @param resource
|
||||
* Item required in resource stack. Will be reduced by one per produced item.
|
||||
* @param product
|
||||
* Item to produce per resource processed.
|
||||
* @param timePerItem
|
||||
* Moistener runs at 1 - 4 time ticks per ingame tick depending on light level. For mycelium this value is currently 5000.
|
||||
*/
|
||||
public void addRecipe(ItemStack resource, ItemStack product, int timePerItem);
|
||||
}
|
45
BM_src/forestry/api/recipes/ISqueezerManager.java
Normal file
45
BM_src/forestry/api/recipes/ISqueezerManager.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
/**
|
||||
* Provides an interface to the recipe manager of the suqeezer.
|
||||
*
|
||||
* The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
|
||||
* if your mod loads before Forestry.
|
||||
*
|
||||
* Accessible via {@link RecipeManagers}
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface ISqueezerManager extends ICraftingProvider {
|
||||
|
||||
/**
|
||||
* Add a recipe to the squeezer.
|
||||
*
|
||||
* @param timePerItem
|
||||
* Number of work cycles required to squeeze one set of resources.
|
||||
* @param resources
|
||||
* Array of item stacks representing the required resources for one process. Stack size will be taken into account.
|
||||
* @param liquid
|
||||
* {@link FluidStack} representing the output of this recipe.
|
||||
* @param remnants
|
||||
* Item stack representing the possible remnants from this recipe.
|
||||
* @param chance
|
||||
* Chance remnants will be produced by a single recipe cycle.
|
||||
*/
|
||||
public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid, ItemStack remnants, int chance);
|
||||
|
||||
/**
|
||||
* Add a recipe to the squeezer.
|
||||
*
|
||||
* @param timePerItem
|
||||
* Number of work cycles required to squeeze one set of resources.
|
||||
* @param resources
|
||||
* Array of item stacks representing the required resources for one process. Stack size will be taken into account.
|
||||
* @param liquid
|
||||
* {@link FluidStack} representing the output of this recipe.
|
||||
*/
|
||||
public void addRecipe(int timePerItem, ItemStack[] resources, FluidStack liquid);
|
||||
}
|
29
BM_src/forestry/api/recipes/IStillManager.java
Normal file
29
BM_src/forestry/api/recipes/IStillManager.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
/**
|
||||
* Provides an interface to the recipe manager of the still.
|
||||
*
|
||||
* The manager is initialized at the beginning of Forestry's BaseMod.load() cycle. Begin adding recipes in BaseMod.ModsLoaded() and this shouldn't be null even
|
||||
* if your mod loads before Forestry.
|
||||
*
|
||||
* Accessible via {@link RecipeManagers}
|
||||
*
|
||||
* Note that this is untested with anything other than biomass->biofuel conversion.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IStillManager extends ICraftingProvider {
|
||||
/**
|
||||
* Add a recipe to the still
|
||||
*
|
||||
* @param cyclesPerUnit
|
||||
* Amount of work cycles required to run through the conversion once.
|
||||
* @param input
|
||||
* ItemStack representing the input liquid.
|
||||
* @param output
|
||||
* ItemStack representing the output liquid
|
||||
*/
|
||||
public void addRecipe(int cyclesPerUnit, FluidStack input, FluidStack output);
|
||||
}
|
16
BM_src/forestry/api/recipes/IVariableFermentable.java
Normal file
16
BM_src/forestry/api/recipes/IVariableFermentable.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Fermenter checks any valid fermentation item for an implementation of this interface.
|
||||
* This does not supersede adding a proper recipe to the fermenter!
|
||||
*/
|
||||
public interface IVariableFermentable {
|
||||
|
||||
/**
|
||||
* @param itemstack
|
||||
* @return Float representing the modification to be applied to the matching recipe's biomass output.
|
||||
*/
|
||||
float getFermentationModifier(ItemStack itemstack);
|
||||
}
|
44
BM_src/forestry/api/recipes/RecipeManagers.java
Normal file
44
BM_src/forestry/api/recipes/RecipeManagers.java
Normal file
|
@ -0,0 +1,44 @@
|
|||
package forestry.api.recipes;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Contains all available recipe managers for Forestry machines and items.
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public class RecipeManagers {
|
||||
|
||||
public static Collection<ICraftingProvider> craftingProviders;
|
||||
|
||||
/**
|
||||
* Allows you to add recipes to the bottler. See {@link IBottlerManager} for details.
|
||||
*/
|
||||
public static IBottlerManager bottlerManager;
|
||||
/**
|
||||
* Allows you to add recipes to the carpenter. See {@link ICarpenterManager} for details.
|
||||
*/
|
||||
public static ICarpenterManager carpenterManager;
|
||||
/**
|
||||
* Allows you to add recipes to the centrifuge. See {@link ICentrifugeManager} for details.
|
||||
*/
|
||||
public static ICentrifugeManager centrifugeManager;
|
||||
/**
|
||||
* Allows you to add recipes to the fermenter. See {@link IFermenterManager} for details.
|
||||
*/
|
||||
public static IFermenterManager fermenterManager;
|
||||
/**
|
||||
* Allows you to add recipes to the moistener. See {@link IMoistenerManager} for details.
|
||||
*/
|
||||
public static IMoistenerManager moistenerManager;
|
||||
/**
|
||||
* Allows you to add recipes to the squeezer. See {@link ISqueezerManager} for details.
|
||||
*/
|
||||
public static ISqueezerManager squeezerManager;
|
||||
/**
|
||||
* Allows you to add recipes to the still. See {@link IStillManager} for details.
|
||||
*/
|
||||
public static IStillManager stillManager;
|
||||
|
||||
public static IFabricatorManager fabricatorManager;
|
||||
}
|
3
BM_src/forestry/api/recipes/package-info.java
Normal file
3
BM_src/forestry/api/recipes/package-info.java
Normal file
|
@ -0,0 +1,3 @@
|
|||
@API(apiVersion="1.0", owner="ForestryAPI|core", provides="ForestryAPI|recipes")
|
||||
package forestry.api.recipes;
|
||||
import cpw.mods.fml.common.API;
|
Loading…
Add table
Add a link
Reference in a new issue