Search in sources :

Example 26 with ISpellModifier

use of am2.api.spell.component.interfaces.ISpellModifier in project ArsMagica2 by Mithion.

the class ItemSpellPart method registerIcons.

@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister IIconRegister) {
    ArrayList<Integer> parts = SkillManager.instance.getAllShapes();
    parts.addAll(SkillManager.instance.getAllComponents());
    parts.addAll(SkillManager.instance.getAllModifiers());
    parts.addAll(SkillManager.instance.getAllTalents());
    int count = 0;
    for (Integer i : parts) {
        if (i == null)
            continue;
        ISkillTreeEntry entry = SkillManager.instance.getSkill(i);
        String subfolder = "";
        if (entry instanceof ISpellShape)
            subfolder = "shapes";
        else if (entry instanceof ISpellComponent)
            subfolder = "components";
        else if (entry instanceof ISpellModifier)
            subfolder = "modifiers";
        else
            subfolder = "skills";
        String skillName = SkillManager.instance.getSkillName(entry);
        IIcon IIcon = ResourceManager.RegisterTexture(String.format("spells/%s/%s.png", subfolder, skillName), IIconRegister);
        SpellIconManager.instance.registerIcon(skillName, IIcon);
    }
}
Also used : ISpellComponent(am2.api.spell.component.interfaces.ISpellComponent) IIcon(net.minecraft.util.IIcon) ISkillTreeEntry(am2.api.spell.component.interfaces.ISkillTreeEntry) ISpellModifier(am2.api.spell.component.interfaces.ISpellModifier) ISpellShape(am2.api.spell.component.interfaces.ISpellShape) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

ISpellModifier (am2.api.spell.component.interfaces.ISpellModifier)17 Colour (am2.spell.modifiers.Colour)13 EntityPlayer (net.minecraft.entity.player.EntityPlayer)8 ModifierCalculatedEvent (am2.api.events.ModifierCalculatedEvent)6 Entity (net.minecraft.entity.Entity)6 EntityLivingBase (net.minecraft.entity.EntityLivingBase)5 EntityDragonPart (net.minecraft.entity.boss.EntityDragonPart)5 ISpellComponent (am2.api.spell.component.interfaces.ISpellComponent)4 ISpellShape (am2.api.spell.component.interfaces.ISpellShape)4 ItemStack (net.minecraft.item.ItemStack)4 AMVector3 (am2.api.math.AMVector3)2 Affinity (am2.api.spell.enums.Affinity)2 AMDataWriter (am2.network.AMDataWriter)2 AMParticle (am2.particles.AMParticle)2 Summon (am2.spell.components.Summon)2 DummyEntityPlayer (am2.utility.DummyEntityPlayer)2 KeyValuePair (am2.utility.KeyValuePair)2 SkillLearnedEvent (am2.api.events.SkillLearnedEvent)1 AMLineSegment (am2.api.math.AMLineSegment)1 ISkillTreeEntry (am2.api.spell.component.interfaces.ISkillTreeEntry)1