Search in sources :

Example 1 with MissingShape

use of am2.spell.shapes.MissingShape in project ArsMagica2 by Mithion.

the class SpellBase method getItemStackDisplayName.

@Override
public String getItemStackDisplayName(ItemStack par1ItemStack) {
    if (par1ItemStack.stackTagCompound == null)
        return "\247bMalformed Spell";
    ISpellShape shape = SpellUtils.instance.getShapeForStage(par1ItemStack, 0);
    if (shape instanceof MissingShape) {
        return "Unnamed Spell";
    }
    String clsName = shape.getClass().getName();
    return clsName.substring(clsName.lastIndexOf('.') + 1) + " Spell";
}
Also used : MissingShape(am2.spell.shapes.MissingShape) ISpellShape(am2.api.spell.component.interfaces.ISpellShape)

Aggregations

ISpellShape (am2.api.spell.component.interfaces.ISpellShape)1 MissingShape (am2.spell.shapes.MissingShape)1