Search in sources :

Example 6 with ArmourUpgrade

use of WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade 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)6 ItemStack (net.minecraft.item.ItemStack)6 TESocket (WayofTime.alchemicalWizardry.common.tileEntity.TESocket)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 ArmourComponent (WayofTime.alchemicalWizardry.common.ArmourComponent)1 BoundArmour (WayofTime.alchemicalWizardry.common.items.armour.BoundArmour)1 SigilDivination (WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination)1 EntityLightningBolt (net.minecraft.entity.effect.EntityLightningBolt)1 EntityItem (net.minecraft.entity.item.EntityItem)1 Item (net.minecraft.item.Item)1 ItemArmor (net.minecraft.item.ItemArmor)1 TileEntity (net.minecraft.tileentity.TileEntity)1 IGoggles (thaumcraft.api.IGoggles)1 IRunicArmor (thaumcraft.api.IRunicArmor)1