I am having a hard time with comparing these two objects.
What I am trying to do is verify if the Item (from GameRegistry.findItem(modid, name)) matches the ItemStack (from the player's inventory)
I am certain that none of the objects used are null, and yet I have had no luck getting it to return true when it does match. I have checked that all of the parameters are correct, and have tried several different condtions, such as these 3:
ItemStack.areItemStacksEqual(new ItemStack(item, stack.stackSize), stack)
item.getClass().isInstance(stack.getItem())
stack.getItem().getClass().isInstance(item)
However, all 3 give the same result of always returning false