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) { for (CustomWrappedStack wrappedRecipeInput : recipeInputs) {
float weight = wrappedRecipeInput.getStackSize();
CustomWrappedStack recipeInput = null;
if (wrappedRecipeInput.getItemStack() != null) { if (wrappedRecipeInput.getItemStack() != null) {
ItemStack itemStack = wrappedRecipeInput.getItemStack(); ItemStack itemStack = wrappedRecipeInput.getItemStack();
itemStack.stackSize = wrappedRecipeInput.getStackSize();
if (OreDictionary.getOreID(itemStack) != -1) { if (OreDictionary.getOreID(itemStack) != -1) {
wrappedRecipeInput = new CustomWrappedStack(new OreStack(itemStack)); recipeInput = new CustomWrappedStack(new OreStack(itemStack));
}
else {
recipeInput = new CustomWrappedStack(itemStack);
} }
} }
else if (wrappedRecipeInput.getOreStack() != null) {
float weight = wrappedRecipeInput.getStackSize(); recipeInput = new CustomWrappedStack(wrappedRecipeInput.getOreStack());
wrappedRecipeInput.setStackSize(1); }
try { try {
graph.addEdge(customWrappedStack, wrappedRecipeInput, weight); if (recipeInput != null) {
graph.addEdge(customWrappedStack, recipeInput, weight);
}
} }
catch (NoSuchElementException e) { 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,8 +11,7 @@ package com.pahimar.ee3.lib;
*/ */
public class Textures { public class Textures {
// Base file pathes // Base file paths
public static final String ITEM_TEXTURE_LOCATION = "/mods/ee3/textures/items/";
public static final String MODEL_SHEET_LOCATION = "/mods/ee3/textures/models/"; 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 ARMOR_SHEET_LOCATION = "/mods/ee3/textures/armor/";
public static final String GUI_SHEET_LOCATION = "/mods/ee3/textures/gui/"; public static final String GUI_SHEET_LOCATION = "/mods/ee3/textures/gui/";