Search in sources :

Example 1 with IBoundItem

use of am2.items.IBoundItem in project ArsMagica2 by Mithion.

the class AMIngameGUI method renderGameOverlay.

public void renderGameOverlay() {
    ItemStack ci = Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem();
    boolean drawAMHud = !AMCore.config.showHudMinimally() || (ci != null && (ci.getItem() == ItemsCommonProxy.spellBook || ci.getItem() == ItemsCommonProxy.spell || ci.getItem() == ItemsCommonProxy.arcaneSpellbook || ci.getItem() instanceof IBoundItem));
    ScaledResolution scaledresolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
    int i = scaledresolution.getScaledWidth();
    int j = scaledresolution.getScaledHeight();
    GL11.glPushAttrib(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_TEXTURE_BIT);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    if (drawAMHud)
        RenderBuffs(i, j);
    mc.renderEngine.bindTexture(items);
    if (drawAMHud)
        RenderContingency(i, j);
    if (drawAMHud)
        RenderArsMagicaGUIItems(i, j, mc.fontRenderer);
    if (drawAMHud)
        RenderAffinity(i, j);
    RenderArmorStatus(i, j, mc, mc.fontRenderer);
    if (drawAMHud)
        RenderMagicXP(i, j);
    ItemStack item = mc.thePlayer.getCurrentEquippedItem();
    if (item != null && item.getItem() instanceof ItemSpellBook) {
        RenderSpellBookUI(i, j, mc.fontRenderer, mc.thePlayer.getCurrentEquippedItem());
    }
    GL11.glPopAttrib();
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glColor4f(1, 1, 1, 1);
}
Also used : IBoundItem(am2.items.IBoundItem) ScaledResolution(net.minecraft.client.gui.ScaledResolution) ItemStack(net.minecraft.item.ItemStack) ItemSpellBook(am2.items.ItemSpellBook)

Aggregations

IBoundItem (am2.items.IBoundItem)1 ItemSpellBook (am2.items.ItemSpellBook)1 ScaledResolution (net.minecraft.client.gui.ScaledResolution)1 ItemStack (net.minecraft.item.ItemStack)1