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

Method contains

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

Checks to see if the given required stack is contained fully in the given container stack.

(ItemStack required, ItemStack container)

Source from the content-addressed store, hash-verified

41
42 /** Checks to see if the given required stack is contained fully in the given container stack. */
43 public static boolean contains(ItemStack required, ItemStack container) {
44 if (canMerge(required, container)) {
45 return container.stackSize >= required.stackSize;
46 }
47 return false;
48 }
49
50 /** Checks to see if the given required stack is contained fully in a single stack in a list. */
51 public static boolean contains(ItemStack required, Collection<ItemStack> containers) {

Callers 2

containsAllMethod · 0.95
matchesMethod · 0.95

Calls 1

canMergeMethod · 0.95

Tested by

no test coverage detected