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;
}
Aggregations