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