Search in sources :

Example 1 with IGoggles

use of thaumcraft.api.IGoggles in project BloodMagic by WayofTime.

the class BoundArmour method hasIGoggles.

@Optional.Method(modid = "Thaumcraft")
public boolean hasIGoggles(ItemStack itemStack) {
    ItemStack[] inv = getInternalInventory(itemStack);
    if (inv == null) {
        return false;
    }
    int blood = getMaxBloodShardLevel(itemStack);
    for (ItemStack item : inv) {
        if (item == null) {
            continue;
        }
        if (item.getItem() instanceof ArmourUpgrade && blood > 0) {
            if (item.getItem() instanceof IGoggles) {
                return true;
            }
            if (((ArmourUpgrade) item.getItem()).isUpgrade()) {
                blood--;
            }
        }
    }
    return false;
}
Also used : ArmourUpgrade(WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade) ItemStack(net.minecraft.item.ItemStack) IGoggles(thaumcraft.api.IGoggles)

Aggregations

ArmourUpgrade (WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade)1 ItemStack (net.minecraft.item.ItemStack)1 IGoggles (thaumcraft.api.IGoggles)1