Search in sources :

Example 31 with Affinity

use of am2.api.spell.enums.Affinity in project ArsMagica2 by Mithion.

the class ItemFlickerJar method getColorFromItemStack.

@Override
public int getColorFromItemStack(ItemStack stack, int pass) {
    if (stack.getItemDamage() > 0 && pass == 0) {
        int meta = stack.getItemDamage();
        Affinity aff = Affinity.values()[meta];
        return aff.color;
    } else {
        return 0xFFFFFF;
    }
}
Also used : Affinity(am2.api.spell.enums.Affinity)

Aggregations

Affinity (am2.api.spell.enums.Affinity)27 AffinityData (am2.playerextensions.AffinityData)6 ItemStack (net.minecraft.item.ItemStack)6 EntityPlayer (net.minecraft.entity.player.EntityPlayer)4 TileEntity (net.minecraft.tileentity.TileEntity)4 ArrayList (java.util.ArrayList)3 AMVector2 (am2.api.math.AMVector2)2 AMVector3 (am2.api.math.AMVector3)2 ISpellModifier (am2.api.spell.component.interfaces.ISpellModifier)2 AMParticle (am2.particles.AMParticle)2 Colour (am2.spell.modifiers.Colour)2 HashMap (java.util.HashMap)2 Block (net.minecraft.block.Block)2 WrongUsageException (net.minecraft.command.WrongUsageException)2 EntityLivingBase (net.minecraft.entity.EntityLivingBase)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 ChatComponentText (net.minecraft.util.ChatComponentText)2 AffinityChangingEvent (am2.api.events.AffinityChangingEvent)1 ManaCostEvent (am2.api.events.ManaCostEvent)1 SpellRecipeItemsEvent (am2.api.events.SpellRecipeItemsEvent)1