Java Code Examples for codechicken.lib.util.ArrayUtils#count()

The following examples show how to use codechicken.lib.util.ArrayUtils#count() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExtendedCreativeInv.java    From NotEnoughItems with MIT License 5 votes vote down vote up
@Override
public boolean isEmpty() {
    ItemStack[] items;
    if (side.isClient()) {
        items = NEIClientConfig.creativeInv;
    } else {
        items = playerSave.creativeInv;
    }
    return ArrayUtils.count(items, (stack -> !stack.isEmpty())) <= 0;
}
 
Example 2
Source File: EnderItemStorage.java    From EnderStorage with MIT License 4 votes vote down vote up
@Override
public boolean isEmpty() {
    return ArrayUtils.count(items, (stack -> !stack.isEmpty())) <= 0;
}
 
Example 3
Source File: InventoryCopy.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public boolean isEmpty() {
    return ArrayUtils.count(items, (stack -> !stack.isEmpty())) <= 0;
}
 
Example 4
Source File: InventoryNBT.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public boolean isEmpty() {
    return ArrayUtils.count(items, (stack -> !stack.isEmpty())) <= 0;
}
 
Example 5
Source File: InventorySimple.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public boolean isEmpty() {
    return ArrayUtils.count(items, (stack -> !stack.isEmpty())) <= 0;
}