Added javaDoc and updated deps

This commit is contained in:
modmuss50 2015-11-22 16:24:50 +00:00
parent d545521d04
commit 7bcc793d12
7 changed files with 72 additions and 26 deletions

View file

@ -5,6 +5,8 @@ import net.minecraft.item.ItemStack;
public interface IEnergyInterfaceItem extends IEnergyItemInfo{
/**
* @return Amount of energy in the tile
*
* @param stack The {@link ItemStack} that contains the power
*/
public double getEnergy(ItemStack stack);
@ -12,12 +14,14 @@ public interface IEnergyInterfaceItem extends IEnergyItemInfo{
* Sets the energy in the tile
*
* @param energy the amount of energy to set.
* @param stack The {@link ItemStack} that contains the power
*/
public void setEnergy(double energy, ItemStack stack);
/**
* @param energy amount of energy to add to the tile
* @param stack The {@link ItemStack} that contains the power
* @return will return true if can fit all
*/
public boolean canAddEnergy(double energy, ItemStack stack);
@ -26,6 +30,7 @@ public interface IEnergyInterfaceItem extends IEnergyItemInfo{
* Will try add add the full amount of energy.
*
* @param energy amount to add
* @param stack The {@link ItemStack} that contains the power
* @return The amount of energy that was added.
*/
public double addEnergy(double energy, ItemStack stack);
@ -34,6 +39,7 @@ public interface IEnergyInterfaceItem extends IEnergyItemInfo{
* Will try add add the full amount of energy, if simulate is true it wont add the energy
*
* @param energy amount to add
* @param stack The {@link ItemStack} that contains the power
* @return The amount of energy that was added.
*/
public double addEnergy(double energy, boolean simulate, ItemStack stack);
@ -42,6 +48,7 @@ public interface IEnergyInterfaceItem extends IEnergyItemInfo{
* Returns true if it can use the full amount of energy
*
* @param energy amount of energy to use from the tile.
* @param stack The {@link ItemStack} that contains the power
* @return if all the energy can be used.
*/
public boolean canUseEnergy(double energy, ItemStack stack);
@ -50,6 +57,7 @@ public interface IEnergyInterfaceItem extends IEnergyItemInfo{
* Will try and use the full amount of energy
*
* @param energy energy to use
* @param stack The {@link ItemStack} that contains the power
* @return the amount of energy used
*/
public double useEnergy(double energy, ItemStack stack);
@ -59,6 +67,8 @@ public interface IEnergyInterfaceItem extends IEnergyItemInfo{
* Will try and use the full amount of energy, if simulate is true it wont add the energy
*
* @param energy energy to use
* @param simulate if true it will not use the item, it will only simulate it.
* @param stack The {@link ItemStack} that contains the power
* @return the amount of energy used
*/
public double useEnergy(double energy, boolean simulate, ItemStack stack);

View file

@ -41,6 +41,7 @@ public interface IEnergyInterfaceTile {
* Will try add add the full amount of energy, if simulate is true it wont add the energy
*
* @param energy amount to add
* @param simulate set to true to simulate not perform the action.
* @return The amount of energy that was added.
*/
public double addEnergy(double energy, boolean simulate);
@ -66,6 +67,7 @@ public interface IEnergyInterfaceTile {
* Will try and use the full amount of energy, if simulate is true it wont add the energy
*
* @param energy energy to use
* @param simulate set to true to simulate not perform the action.
* @return the amount of energy used
*/
public double useEnergy(double energy, boolean simulate);
@ -78,7 +80,7 @@ public interface IEnergyInterfaceTile {
/**
* @param direction The direction to provide energy from
* @return
* @return true if the tile can provide energy to that direction
*/
public boolean canProvideEnergy(ForgeDirection direction);

View file

@ -6,23 +6,38 @@ import net.minecraft.item.ItemStack;
public interface IEnergyItemInfo {
/**
* Gets the max stored energy in the tile
* Gets the max stored energy in the item
*
* @param stack The {@link ItemStack} that contains the power
* @return The max energy
*/
double getMaxPower(ItemStack stack);
/**
* Can the item accept energy.
* @param stack The {@link ItemStack} that contains the power
* @return if it can accept energy
*/
boolean canAcceptEnergy(ItemStack stack);
/**
* Can the item recieve energy
* @param stack The {@link ItemStack} that contains the power
* @return if it can provide energy
*/
boolean canProvideEnergy(ItemStack stack);
/**
*
* @param stack The {@link ItemStack} that contains the power
* @return Max amout of energy that can be transfured in one tick.
*/
double getMaxTransfer(ItemStack stack);
/**
*
* @param stack The {@link ItemStack} that contains the power
* @return The ic2 teir that the stack should be.
*/
int getStackTeir(ItemStack stack);
}

View file

@ -5,12 +5,15 @@ import java.util.ArrayList;
public class FusionReactorRecipeHelper {
/**
* This is the list of all the recipes
*/
public static ArrayList<FusionReactorRecipe> reactorRecipes = new ArrayList<FusionReactorRecipe>();
/**
* Register your reactor recipe here
*
* @param reactorRecipe
* @param reactorRecipe the recipe you want to add
*/
public static void registerRecipe(FusionReactorRecipe reactorRecipe){
reactorRecipes.add(reactorRecipe);

View file

@ -19,7 +19,7 @@ public interface IBaseRecipeType {
/**
* This gets the output form the array list
*
* @param i get output form position in arraylist
* @return the output
*/
public ItemStack getOutput(int i);
@ -45,7 +45,7 @@ public interface IBaseRecipeType {
/**
* This should be a user friendly name
*
* @return
* @return The user friendly name of the recipe.
*/
public String getUserFreindlyName();

View file

@ -57,13 +57,13 @@ public class RecipeCrafter {
/**
* This is the constructor, not a lot to say here :P
*
* @param recipeName
* @param parentTile
* @param inputs
* @param outputs
* @param inventory
* @param inputSlots
* @param outputSlots
* @param recipeName The recipe name that should be crafted
* @param parentTile The tile that wil be using this recipe crafter
* @param inputs The amount of input slots
* @param outputs The amount of output slots
* @param inventory The inventory of the machine
* @param inputSlots A list of the input slot ids
* @param outputSlots A list of output slot ids
*/
public RecipeCrafter(String recipeName, TileMachineBase parentTile, int inputs, int outputs, Inventory inventory, int[] inputSlots, int[] outputSlots) {
this.recipeName = recipeName;