Search in sources :

Example 1 with ContingencyTypes

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

the class AMIngameGUI method RenderContingency.

public void RenderContingency(int i, int j) {
    AMVector2 contingencyPos = getShiftedVector(AMCore.config.getContingencyPosition(), i, j);
    IIcon icon = null;
    ContingencyTypes type = ExtendedProperties.For(Minecraft.getMinecraft().thePlayer).getContingencyType();
    switch(type) {
        case DAMAGE_TAKEN:
            icon = SpellIconManager.instance.getIcon("Contingency_Damage");
            break;
        case FALL:
            icon = SpellIconManager.instance.getIcon("Contingency_Fall");
            break;
        case HEALTH_LOW:
            icon = SpellIconManager.instance.getIcon("Contingency_Health");
            break;
        case ON_FIRE:
            icon = SpellIconManager.instance.getIcon("Contingency_Fire");
            break;
        case DEATH:
            icon = SpellIconManager.instance.getIcon("Contingency_Death");
            break;
        case NONE:
        default:
            return;
    }
    DrawIconAtXY(icon, "items", contingencyPos.iX, contingencyPos.iY, 16, 16, true);
    GL11.glColor3f(1.0f, 1.0f, 1.0f);
}
Also used : IIcon(net.minecraft.util.IIcon) AMVector2(am2.api.math.AMVector2) ContingencyTypes(am2.api.spell.enums.ContingencyTypes)

Aggregations

AMVector2 (am2.api.math.AMVector2)1 ContingencyTypes (am2.api.spell.enums.ContingencyTypes)1 IIcon (net.minecraft.util.IIcon)1