Search in sources :

Example 1 with ItemNacrePearl

use of com.teamwizardry.wizardry.common.item.ItemNacrePearl in project Wizardry by TeamWizardry.

the class RecipePearl method matches.

@Override
public boolean matches(@Nonnull InventoryCrafting inv, @Nonnull World worldIn) {
    boolean foundBaseItem = false;
    boolean foundPearl = false;
    for (int i = 0; i < inv.getSizeInventory(); i++) {
        ItemStack stack = inv.getStackInSlot(i);
        if (stack.getItem() instanceof ItemRing || stack.getItem() instanceof ItemStaff) {
            if (stack.getItemDamage() == 0)
                foundBaseItem = true;
        }
        if (stack.getItem() instanceof ItemNacrePearl)
            foundPearl = true;
    }
    return foundBaseItem && foundPearl;
}
Also used : ItemStaff(com.teamwizardry.wizardry.common.item.ItemStaff) ItemRing(com.teamwizardry.wizardry.common.item.ItemRing) ItemNacrePearl(com.teamwizardry.wizardry.common.item.ItemNacrePearl) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ItemNacrePearl (com.teamwizardry.wizardry.common.item.ItemNacrePearl)1 ItemRing (com.teamwizardry.wizardry.common.item.ItemRing)1 ItemStaff (com.teamwizardry.wizardry.common.item.ItemStaff)1 ItemStack (net.minecraft.item.ItemStack)1