MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / isInvalid

Method isInvalid

common/buildcraft/lib/misc/StackUtil.java:258–260  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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}

Callers 15

canPutStackInSlotMethod · 0.95
isItemValidForSlotMethod · 0.95
isTriggerActiveMethod · 0.95
renderItemStackMethod · 0.95
canStacksOrListsMergeMethod · 0.95
isMatchingItemOrListMethod · 0.95
isMatchingItemMethod · 0.95
isValidMethod · 0.95
dropMethod · 0.95
addToRandomInventoryMethod · 0.95
addToRandomInjectableMethod · 0.95
asValidMethod · 0.95

Calls 1

getItemMethod · 0.65

Tested by

no test coverage detected