Removed a dead constant, and more work on edge problem resolution

This commit is contained in:
pahimar 2013-06-02 17:23:30 -04:00
parent e3079cbfef
commit b5c1aa2ad0
3 changed files with 17 additions and 10 deletions

View file

@ -157,23 +157,31 @@ public class DynEMC {
for (CustomWrappedStack wrappedRecipeInput : recipeInputs) {
float weight = wrappedRecipeInput.getStackSize();
CustomWrappedStack recipeInput = null;
if (wrappedRecipeInput.getItemStack() != null) {
ItemStack itemStack = wrappedRecipeInput.getItemStack();
itemStack.stackSize = wrappedRecipeInput.getStackSize();
if (OreDictionary.getOreID(itemStack) != -1) {
wrappedRecipeInput = new CustomWrappedStack(new OreStack(itemStack));
recipeInput = new CustomWrappedStack(new OreStack(itemStack));
}
else {
recipeInput = new CustomWrappedStack(itemStack);
}
}
float weight = wrappedRecipeInput.getStackSize();
wrappedRecipeInput.setStackSize(1);
else if (wrappedRecipeInput.getOreStack() != null) {
recipeInput = new CustomWrappedStack(wrappedRecipeInput.getOreStack());
}
try {
graph.addEdge(customWrappedStack, wrappedRecipeInput, weight);
if (recipeInput != null) {
graph.addEdge(customWrappedStack, recipeInput, weight);
}
}
catch (NoSuchElementException e) {
LogHelper.log(Level.SEVERE, e.getMessage() + " from: [" + customWrappedStack + "], to: [" + wrappedRecipeInput + "]");
LogHelper.log(Level.SEVERE, e.getMessage() + ";\nFrom: [" + customWrappedStack + "]\nTo: [" + wrappedRecipeInput + "]");
}
}
}

View file

@ -11,7 +11,7 @@ public class CustomWrappedStack {
private int stackSize;
private ItemStack itemStack;
private OreStack oreStack;
public CustomWrappedStack(ItemStack itemStack) {
this.itemStack = itemStack;

View file

@ -11,8 +11,7 @@ package com.pahimar.ee3.lib;
*/
public class Textures {
// Base file pathes
public static final String ITEM_TEXTURE_LOCATION = "/mods/ee3/textures/items/";
// Base file paths
public static final String MODEL_SHEET_LOCATION = "/mods/ee3/textures/models/";
public static final String ARMOR_SHEET_LOCATION = "/mods/ee3/textures/armor/";
public static final String GUI_SHEET_LOCATION = "/mods/ee3/textures/gui/";