Auto remove un needed things in the code
This commit is contained in:
parent
7e7fcf2ad9
commit
510f969c94
105 changed files with 141 additions and 348 deletions
|
@ -14,13 +14,13 @@ public class RecipeHandler {
|
|||
/**
|
||||
* This is the array list of all of the recipes for all of the machines
|
||||
*/
|
||||
public static final ArrayList<IBaseRecipeType> recipeList = new ArrayList<IBaseRecipeType>();
|
||||
public static final ArrayList<IBaseRecipeType> recipeList = new ArrayList<>();
|
||||
|
||||
public static HashMap<IBaseRecipeType, String> stackMap = new HashMap<IBaseRecipeType, String>();
|
||||
public static HashMap<IBaseRecipeType, String> stackMap = new HashMap<>();
|
||||
/**
|
||||
* This is a list of all the registered machine names.
|
||||
*/
|
||||
public static ArrayList<String> machineNames = new ArrayList<String>();
|
||||
public static ArrayList<String> machineNames = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Use this to get all of the recipes form a recipe name
|
||||
|
@ -29,7 +29,7 @@ public class RecipeHandler {
|
|||
* @return A list of all the recipes of a given name.
|
||||
*/
|
||||
public static List<IBaseRecipeType> getRecipeClassFromName(String name) {
|
||||
List<IBaseRecipeType> baseRecipeList = new ArrayList<IBaseRecipeType>();
|
||||
List<IBaseRecipeType> baseRecipeList = new ArrayList<>();
|
||||
for (IBaseRecipeType baseRecipe : recipeList) {
|
||||
if (baseRecipe.getRecipeName().equals(name)) {
|
||||
baseRecipeList.add(baseRecipe);
|
||||
|
@ -66,7 +66,7 @@ public class RecipeHandler {
|
|||
machineNames.add(recipe.getRecipeName());
|
||||
}
|
||||
recipeList.add(recipe);
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
|
||||
buffer.append(ste);
|
||||
}
|
||||
|
@ -82,10 +82,9 @@ public class RecipeHandler {
|
|||
for (int i = 0; i < baseRecipeType.getInputs().size(); i++) {
|
||||
if (ItemUtils.isItemEqual(baseRecipeType.getInputs().get(i), recipe.getInputs().get(i), true,
|
||||
false, false)) {
|
||||
StringBuffer itemInfo = new StringBuffer();
|
||||
StringBuilder itemInfo = new StringBuilder();
|
||||
for (ItemStack inputs : baseRecipeType.getInputs()) {
|
||||
itemInfo.append(":" + inputs.getItem().getUnlocalizedName() + ","
|
||||
+ inputs.getDisplayName() + "," + inputs.stackSize);
|
||||
itemInfo.append(":").append(inputs.getItem().getUnlocalizedName()).append(",").append(inputs.getDisplayName()).append(",").append(inputs.stackSize);
|
||||
}
|
||||
Core.logHelper.all(stackMap.get(baseRecipeType));
|
||||
// throw new Exception("Found a duplicate recipe for
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.api.recipe.machines;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.api.recipe.machines;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.api.recipe.machines;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.api.recipe.machines;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
|
||||
|
|
|
@ -46,14 +46,14 @@ public class RecipeConfig {
|
|||
|
||||
public void addInputs(ConfigItem item) {
|
||||
if (inputs == null) {
|
||||
inputs = new ArrayList<ConfigItem>();
|
||||
inputs = new ArrayList<>();
|
||||
}
|
||||
inputs.add(item);
|
||||
}
|
||||
|
||||
public void addOutputs(ConfigItem item) {
|
||||
if (outputs == null) {
|
||||
outputs = new ArrayList<ConfigItem>();
|
||||
outputs = new ArrayList<>();
|
||||
}
|
||||
outputs.add(item);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.ArrayList;
|
|||
|
||||
public class RecipeConfigManager {
|
||||
|
||||
public static ArrayList<RecipeConfig> configs = new ArrayList<RecipeConfig>();
|
||||
public static ArrayList<RecipeConfig> configs = new ArrayList<>();
|
||||
|
||||
static File configFile = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue