Search in sources :

Example 1 with IAlchemyGoggles

use of WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles in project BloodMagic by WayofTime.

the class SpellHelper method canPlayerSeeAlchemy.

public static boolean canPlayerSeeAlchemy(EntityPlayer player) {
    if (player != null) {
        ItemStack stack = player.getCurrentArmor(3);
        if (stack != null) {
            Item item = stack.getItem();
            if (item instanceof IAlchemyGoggles && ((IAlchemyGoggles) item).showIngameHUD(player.worldObj, stack, player)) {
                return true;
            }
        }
        ItemStack heldStack = player.getHeldItem();
        if (heldStack != null && heldStack.getItem() instanceof IReagentManipulator) {
            return true;
        }
    }
    return false;
}
Also used : Item(net.minecraft.item.Item) EntityItem(net.minecraft.entity.item.EntityItem) IAlchemyGoggles(WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles) IReagentManipulator(WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator) ItemStack(net.minecraft.item.ItemStack)

Aggregations

IAlchemyGoggles (WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles)1 IReagentManipulator (WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator)1 EntityItem (net.minecraft.entity.item.EntityItem)1 Item (net.minecraft.item.Item)1 ItemStack (net.minecraft.item.ItemStack)1