Merge branch 'MC19' of github.com:williewillus/Botania into MC19

This commit is contained in:
Vincent Lee committed 2016-06-16 23:46:35 -05:00
commit 65bf209835
1 file changed
+6 -4
@@ -48,22 +48,24 @@ public final class LexiconRecipeMappings {
}
public static EntryData getDataForStack(ItemStack stack) {
ItemStack wildCopy = stack.copy();
wildCopy.setItemDamage(OreDictionary.WILDCARD_VALUE);
String wildKey = stackToString(wildCopy);
String wildKey = stackToString(stack, true);
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() + (ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
return stack.getUnlocalizedName() + (forceIgnore || ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
}
public static boolean ignoreMeta(ItemStack stack) {