Compares item id, damage and NBT. Accepts wildcard damage. Ignores damage entirely if the item doesn't have subtypes. @param base The stack to compare to. @param comparison The stack to compare. @return true if id, damage and NBT match.
(final ItemStack base, final ItemStack comparison)
| 195 | * @param comparison The stack to compare. |
| 196 | * @return true if id, damage and NBT match. */ |
| 197 | public static boolean isMatchingItem(final ItemStack base, final ItemStack comparison) { |
| 198 | return isMatchingItem(base, comparison, true, true); |
| 199 | } |
| 200 | |
| 201 | /** This variant also checks damage for damaged items. */ |
| 202 | public static boolean isEqualItem(final ItemStack base, final ItemStack comparison) { |
no test coverage detected