Revert "Fix other mods crashing because of alternate implementations of metadata"

This reverts commit 25cd574662.
This commit is contained in:
Vincent Lee committed 2016-06-17 00:03:04 -05:00
1 parent 65bf209835
commit fc23dedd05
1 file changed
+4 -6
@@ -48,24 +48,22 @@ public final class LexiconRecipeMappings {
}
public static EntryData getDataForStack(ItemStack stack) {
String wildKey = stackToString(stack, true);
ItemStack wildCopy = stack.copy();
wildCopy.setItemDamage(OreDictionary.WILDCARD_VALUE);
String wildKey = stackToString(wildCopy);
if (mappings.containsKey(wildKey))
return mappings.get(wildKey);
return mappings.get(stackToString(stack));
}
public static String stackToString(ItemStack stack) {
return stackToString(stack, false);
}
public static String stackToString(ItemStack stack, boolean forceIgnore) {
if(stack == null || stack.getItem() == null)
return "NULL";
if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider)
return ((IRecipeKeyProvider) stack.getItem()).getKey(stack);
return stack.getUnlocalizedName() + (forceIgnore || ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
return stack.getUnlocalizedName() + (ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
}
public static boolean ignoreMeta(ItemStack stack) {