Cleaner solution

This commit is contained in:
Vincent Lee committed 2016-06-17 00:03:35 -05:00
1 parent fc23dedd05
commit a9cc76576a
1 file changed
+2 -2
@@ -56,14 +56,14 @@ public final class LexiconRecipeMappings {
return mappings.get(stackToString(stack));
}
public static String stackToString(ItemStack stack) {
private static String stackToString(ItemStack stack) {
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.getItem().getRegistryName().toString() + (ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
}
public static boolean ignoreMeta(ItemStack stack) {