Auto formatted, and cleaned imports

This commit is contained in:
Modmuss50 2015-04-15 16:23:12 +01:00
parent c001231216
commit 8e7d6b011e
64 changed files with 2268 additions and 2587 deletions

View file

@ -4,72 +4,72 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class CentrifugeRecipie {
ItemStack inputItem;
ItemStack output1, output2, output3, output4;
int tickTime;
int cells;
ItemStack inputItem;
ItemStack output1, output2, output3, output4;
int tickTime;
int cells;
public CentrifugeRecipie(ItemStack inputItem, ItemStack output1, ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int cells) {
this.inputItem = inputItem;
this.output1 = output1;
this.output2 = output2;
this.output3 = output3;
this.output4 = output4;
this.tickTime = tickTime;
this.cells = cells;
}
public CentrifugeRecipie(ItemStack inputItem, ItemStack output1, ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int cells) {
this.inputItem = inputItem;
this.output1 = output1;
this.output2 = output2;
this.output3 = output3;
this.output4 = output4;
this.tickTime = tickTime;
this.cells = cells;
}
public CentrifugeRecipie(Item inputItem, int inputAmount, Item output1, Item output2, Item output3, Item output4, int tickTime, int cells) {
this.inputItem = new ItemStack(inputItem, inputAmount);
if(output1!= null)
this.output1 = new ItemStack(output1);
if(output2!= null)
this.output2 = new ItemStack(output2);
if(output3!= null)
this.output3 = new ItemStack(output3);
if(output4!= null)
this.output4 = new ItemStack(output4);
this.tickTime = tickTime;
this.cells = cells;
}
public CentrifugeRecipie(Item inputItem, int inputAmount, Item output1, Item output2, Item output3, Item output4, int tickTime, int cells) {
this.inputItem = new ItemStack(inputItem, inputAmount);
if (output1 != null)
this.output1 = new ItemStack(output1);
if (output2 != null)
this.output2 = new ItemStack(output2);
if (output3 != null)
this.output3 = new ItemStack(output3);
if (output4 != null)
this.output4 = new ItemStack(output4);
this.tickTime = tickTime;
this.cells = cells;
}
public CentrifugeRecipie(CentrifugeRecipie centrifugeRecipie){
this.inputItem = centrifugeRecipie.getInputItem();
this.output1 = centrifugeRecipie.getOutput1();
this.output2 = centrifugeRecipie.getOutput2();
this.output3 = centrifugeRecipie.getOutput3();
this.output4 = centrifugeRecipie.getOutput4();
this.tickTime = centrifugeRecipie.getTickTime();
this.cells = centrifugeRecipie.getCells();
}
public CentrifugeRecipie(CentrifugeRecipie centrifugeRecipie) {
this.inputItem = centrifugeRecipie.getInputItem();
this.output1 = centrifugeRecipie.getOutput1();
this.output2 = centrifugeRecipie.getOutput2();
this.output3 = centrifugeRecipie.getOutput3();
this.output4 = centrifugeRecipie.getOutput4();
this.tickTime = centrifugeRecipie.getTickTime();
this.cells = centrifugeRecipie.getCells();
}
public ItemStack getInputItem() {
return inputItem;
}
public ItemStack getInputItem() {
return inputItem;
}
public ItemStack getOutput1() {
return output1;
}
public ItemStack getOutput1() {
return output1;
}
public ItemStack getOutput2() {
return output2;
}
public ItemStack getOutput2() {
return output2;
}
public ItemStack getOutput3() {
return output3;
}
public ItemStack getOutput3() {
return output3;
}
public ItemStack getOutput4() {
return output4;
}
public ItemStack getOutput4() {
return output4;
}
public int getTickTime() {
return tickTime;
}
public int getTickTime() {
return tickTime;
}
public int getCells() {
return cells;
}
public int getCells() {
return cells;
}
}

View file

@ -4,121 +4,116 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class RollingMachineRecipie {
ItemStack inputItem1, inputItem2, inputItem3, inputItem4 ,inputItem5, inputItem6,
inputItem7, inputItem8, inputItem9;
ItemStack output1;
int tickTime;
ItemStack inputItem1, inputItem2, inputItem3, inputItem4, inputItem5, inputItem6,
inputItem7, inputItem8, inputItem9;
ItemStack output1;
int tickTime;
public RollingMachineRecipie(ItemStack inputItem1, ItemStack inputItem2, ItemStack inputItem3, ItemStack inputItem4,
ItemStack inputItem5, ItemStack inputItem6, ItemStack inputItem7, ItemStack inputItem8,ItemStack inputItem9,
ItemStack output1, int tickTime)
{
this.inputItem1 = inputItem1;
this.inputItem2 = inputItem2;
this.inputItem3 = inputItem3;
this.inputItem4 = inputItem4;
this.inputItem5 = inputItem5;
this.inputItem6 = inputItem6;
this.inputItem7 = inputItem7;
this.inputItem8 = inputItem8;
this.inputItem9 = inputItem9;
this.output1 = output1;
this.tickTime = tickTime;
}
public RollingMachineRecipie(Item inputItem1,Item inputItem2, Item inputItem3, Item inputItem4, Item inputItem5,
Item inputItem6, Item inputItem7, Item inputItem8, Item inputItem9, int inputAmount,
Item output1, int tickTime) {
if(inputItem1 != null)
this.inputItem1 = new ItemStack(inputItem1, inputAmount);
if(inputItem2 != null)
this.inputItem2 = new ItemStack(inputItem2, inputAmount);
if(inputItem3 != null)
this.inputItem3 = new ItemStack(inputItem3, inputAmount);
if(inputItem4 != null)
this.inputItem4 = new ItemStack(inputItem4, inputAmount);
if(inputItem5 != null)
this.inputItem5 = new ItemStack(inputItem5, inputAmount);
if(inputItem6 != null)
this.inputItem6 = new ItemStack(inputItem6, inputAmount);
if(inputItem7 != null)
this.inputItem7 = new ItemStack(inputItem7, inputAmount);
if(inputItem8 != null)
this.inputItem8 = new ItemStack(inputItem8, inputAmount);
if(inputItem9 != null)
this.inputItem9 = new ItemStack(inputItem9, inputAmount);
public RollingMachineRecipie(ItemStack inputItem1, ItemStack inputItem2, ItemStack inputItem3, ItemStack inputItem4,
ItemStack inputItem5, ItemStack inputItem6, ItemStack inputItem7, ItemStack inputItem8, ItemStack inputItem9,
ItemStack output1, int tickTime) {
this.inputItem1 = inputItem1;
this.inputItem2 = inputItem2;
this.inputItem3 = inputItem3;
this.inputItem4 = inputItem4;
this.inputItem5 = inputItem5;
this.inputItem6 = inputItem6;
this.inputItem7 = inputItem7;
this.inputItem8 = inputItem8;
this.inputItem9 = inputItem9;
this.output1 = output1;
this.tickTime = tickTime;
this.output1 = new ItemStack(output1);
this.tickTime = tickTime;
;
}
}
public RollingMachineRecipie(RollingMachineRecipie rollingmachineRecipie)
{
this.inputItem1 = rollingmachineRecipie.getInputItem1();
this.inputItem2 = rollingmachineRecipie.getInputItem2();
this.inputItem3 = rollingmachineRecipie.getInputItem3();
this.inputItem4 = rollingmachineRecipie.getInputItem4();
this.inputItem5 = rollingmachineRecipie.getInputItem5();
this.inputItem6 = rollingmachineRecipie.getInputItem6();
this.inputItem7 = rollingmachineRecipie.getInputItem7();
this.inputItem8 = rollingmachineRecipie.getInputItem8();
this.inputItem9 = rollingmachineRecipie.getInputItem9();
public RollingMachineRecipie(Item inputItem1, Item inputItem2, Item inputItem3, Item inputItem4, Item inputItem5,
Item inputItem6, Item inputItem7, Item inputItem8, Item inputItem9, int inputAmount,
Item output1, int tickTime) {
if (inputItem1 != null)
this.inputItem1 = new ItemStack(inputItem1, inputAmount);
if (inputItem2 != null)
this.inputItem2 = new ItemStack(inputItem2, inputAmount);
if (inputItem3 != null)
this.inputItem3 = new ItemStack(inputItem3, inputAmount);
if (inputItem4 != null)
this.inputItem4 = new ItemStack(inputItem4, inputAmount);
if (inputItem5 != null)
this.inputItem5 = new ItemStack(inputItem5, inputAmount);
if (inputItem6 != null)
this.inputItem6 = new ItemStack(inputItem6, inputAmount);
if (inputItem7 != null)
this.inputItem7 = new ItemStack(inputItem7, inputAmount);
if (inputItem8 != null)
this.inputItem8 = new ItemStack(inputItem8, inputAmount);
if (inputItem9 != null)
this.inputItem9 = new ItemStack(inputItem9, inputAmount);
this.output1 = rollingmachineRecipie.getOutput1();
this.tickTime = rollingmachineRecipie.getTickTime();
}
this.output1 = new ItemStack(output1);
this.tickTime = tickTime;
;
}
public ItemStack getInputItem1()
{
return inputItem1;
}
public ItemStack getInputItem2()
{
return inputItem2;
}
public ItemStack getInputItem3()
{
return inputItem3;
}
public ItemStack getInputItem4()
{
return inputItem4;
}
public ItemStack getInputItem5()
{
return inputItem5;
}
public ItemStack getInputItem6()
{
return inputItem6;
}
public ItemStack getInputItem7()
{
return inputItem7;
}
public ItemStack getInputItem8()
{
return inputItem8;
}
public ItemStack getInputItem9()
{
return inputItem9;
}
public RollingMachineRecipie(RollingMachineRecipie rollingmachineRecipie) {
this.inputItem1 = rollingmachineRecipie.getInputItem1();
this.inputItem2 = rollingmachineRecipie.getInputItem2();
this.inputItem3 = rollingmachineRecipie.getInputItem3();
this.inputItem4 = rollingmachineRecipie.getInputItem4();
this.inputItem5 = rollingmachineRecipie.getInputItem5();
this.inputItem6 = rollingmachineRecipie.getInputItem6();
this.inputItem7 = rollingmachineRecipie.getInputItem7();
this.inputItem8 = rollingmachineRecipie.getInputItem8();
this.inputItem9 = rollingmachineRecipie.getInputItem9();
public ItemStack getOutput1()
{
return output1;
}
this.output1 = rollingmachineRecipie.getOutput1();
this.tickTime = rollingmachineRecipie.getTickTime();
}
public ItemStack getInputItem1() {
return inputItem1;
}
public ItemStack getInputItem2() {
return inputItem2;
}
public ItemStack getInputItem3() {
return inputItem3;
}
public ItemStack getInputItem4() {
return inputItem4;
}
public ItemStack getInputItem5() {
return inputItem5;
}
public ItemStack getInputItem6() {
return inputItem6;
}
public ItemStack getInputItem7() {
return inputItem7;
}
public ItemStack getInputItem8() {
return inputItem8;
}
public ItemStack getInputItem9() {
return inputItem9;
}
public ItemStack getOutput1() {
return output1;
}
public int getTickTime() {
return tickTime;
}
public int getTickTime()
{
return tickTime;
}
}

View file

@ -1,53 +1,51 @@
package techreborn.api;
import java.util.ArrayList;
import techreborn.util.ItemUtils;
import java.util.ArrayList;
public final class TechRebornAPI {
public static ArrayList<CentrifugeRecipie> centrifugeRecipies = new ArrayList<CentrifugeRecipie>();
public static ArrayList<RollingMachineRecipie> rollingmachineRecipes = new ArrayList<RollingMachineRecipie>();
public static ArrayList<CentrifugeRecipie> centrifugeRecipies = new ArrayList<CentrifugeRecipie>();
public static ArrayList<RollingMachineRecipie> rollingmachineRecipes = new ArrayList<RollingMachineRecipie>();
public static void registerCentrifugeRecipe(CentrifugeRecipie recipie){
boolean shouldAdd = true;
for(CentrifugeRecipie centrifugeRecipie : centrifugeRecipies){
if(ItemUtils.isItemEqual(centrifugeRecipie.getInputItem(), recipie.getInputItem(), false, true)){
try {
throw new RegisteredItemRecipe("Item " + recipie.getInputItem().getUnlocalizedName() + " is already being used in a recipe for the Centrifuge");
} catch (RegisteredItemRecipe registeredItemRecipe) {
registeredItemRecipe.printStackTrace();
shouldAdd = false;
}
}
}
if(shouldAdd)
centrifugeRecipies.add(recipie);
}
public static void registerRollingMachineRecipe(RollingMachineRecipie recipie){
boolean shouldAdd = true;
for(CentrifugeRecipie centrifugeRecipie : centrifugeRecipies){
if(ItemUtils.isItemEqual(centrifugeRecipie.getInputItem(), recipie.getInputItem1(), false, true)){
try {
throw new RegisteredItemRecipe("Item " + recipie.getInputItem1().getUnlocalizedName() + " is already being used in a recipe for the RollingMachine");
} catch (RegisteredItemRecipe registeredItemRecipe) {
registeredItemRecipe.printStackTrace();
shouldAdd = false;
}
}
}
if(shouldAdd)
rollingmachineRecipes.add(recipie);
}
public static void registerCentrifugeRecipe(CentrifugeRecipie recipie) {
boolean shouldAdd = true;
for (CentrifugeRecipie centrifugeRecipie : centrifugeRecipies) {
if (ItemUtils.isItemEqual(centrifugeRecipie.getInputItem(), recipie.getInputItem(), false, true)) {
try {
throw new RegisteredItemRecipe("Item " + recipie.getInputItem().getUnlocalizedName() + " is already being used in a recipe for the Centrifuge");
} catch (RegisteredItemRecipe registeredItemRecipe) {
registeredItemRecipe.printStackTrace();
shouldAdd = false;
}
}
}
if (shouldAdd)
centrifugeRecipies.add(recipie);
}
public static void registerRollingMachineRecipe(RollingMachineRecipie recipie) {
boolean shouldAdd = true;
for (CentrifugeRecipie centrifugeRecipie : centrifugeRecipies) {
if (ItemUtils.isItemEqual(centrifugeRecipie.getInputItem(), recipie.getInputItem1(), false, true)) {
try {
throw new RegisteredItemRecipe("Item " + recipie.getInputItem1().getUnlocalizedName() + " is already being used in a recipe for the RollingMachine");
} catch (RegisteredItemRecipe registeredItemRecipe) {
registeredItemRecipe.printStackTrace();
shouldAdd = false;
}
}
}
if (shouldAdd)
rollingmachineRecipes.add(recipie);
}
}
class RegisteredItemRecipe extends Exception
{
public RegisteredItemRecipe(String message)
{
super(message);
}
class RegisteredItemRecipe extends Exception {
public RegisteredItemRecipe(String message) {
super(message);
}
}

View file

@ -1,5 +1,3 @@
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI")
package techreborn.api;
@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api;
import cpw.mods.fml.common.API;