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);
}
}
Aggregations