Examples of ArmorCore


Examples of tconstruct.library.armor.ArmorCore

            drawModularToolStats(stack, tool, tags, 294, 24);
        }
        if(stack.getItem() instanceof ArmorCore)
        {
            ArmorCore armor = (ArmorCore) stack.getItem();
            NBTTagCompound tags = stack.getTagCompound().getCompoundTag(armor.getBaseTagName());
            this.drawCenteredString(fontRendererObj, "\u00A7n" + stack.getDisplayName(), 349, 8, 0xffffff); // todo: localize

            drawModularArmorStats(stack, armor, tags, 294, 24);
        }
        if(stack.getItem() instanceof AccessoryCore)
View Full Code Here

Examples of tconstruct.library.armor.ArmorCore

                hasTool = true;
                centerTitle = "\u00A7n" + tool.getLocalizedToolName();
            }
            else if (stack.getItem() instanceof ArmorCore)
            {
                ArmorCore armor = (ArmorCore) stack.getItem();
                tags = stack.getTagCompound().getCompoundTag(armor.getBaseTagName());
                hasArmor = true;
                centerTitle = "\u00A7n" + stack.getDisplayName(); // todo: localize
            }
            else if (stack.getItem() instanceof AccessoryCore)
            {
View Full Code Here

Examples of tconstruct.library.armor.ArmorCore

    private static DecimalFormat df =  new DecimalFormat("##.#");

    // todo: do this properly, quick and dirty fix
    protected void drawModularArmorStats ()
    {
        ArmorCore armor = (ArmorCore)centerStack.getItem();
        List categories = Arrays.asList(armor.getTraits());
        final int baseX = descTextLeft + 10;
        final int baseY = 24;
        int offset = 0;

        // durability
        final int durability = tags.getInteger("Damage");
        final int maxDur = tags.getInteger("TotalDurability");
        int availableDurability = maxDur - durability;

        // Durability
        if (maxDur > 0)
        {
            if (maxDur >= 10000)
            {
                fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation1"), baseX, baseY + offset * 11, 0xffffff);
                offset++;
                fontRendererObj.drawString("- " + availableDurability + "/" + maxDur, baseX, baseY + offset * 10, 0xffffff);
                offset++;
            }
            else
            {
                fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation2") + availableDurability + "/" + maxDur, baseX, baseY + offset * 10, 0xffffff);
                offset++;
            }
        }
        // Damage reduction
        double damageReduction = tags.getDouble("DamageReduction");
        if(damageReduction > 0.000001d)
        {
            fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation19") + df.format(damageReduction), baseX, baseY + offset * 10, 0xffffff);
            offset++;
        }

        // Protection
        double protection = armor.getProtection(centerStack);
        double maxProtection = tags.getDouble("MaxDefense");
        //if(maxProtection > protection)
        fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation20") + df.format(protection) + "/" + df.format(maxProtection), baseX, baseY + offset * 10, 0xffffff);
        //else
        //  fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation20") + df.format(protection), x, base + offset * 10, 0xffffff);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.