Tests to see if a given stack is invalid. This ALSO tests to see if the item is null or the stacksize is less than 0. Vanilla's method also does a metadata check, but that's not used so much in the codebase.
(ItemStack stack)
| 256 | /** Tests to see if a given stack is invalid. This ALSO tests to see if the item is null or the stacksize is less |
| 257 | * than 0. Vanilla's method also does a metadata check, but that's not used so much in the codebase. */ |
| 258 | public static boolean isInvalid(ItemStack stack) { |
| 259 | return stack == INVALID_STACK || stack.getItem() == null || stack.stackSize <= 0; |
| 260 | } |
| 261 | } |
no test coverage detected