use of net.silentchaos512.gems.lib.ChaosBuff in project SilentGems by SilentChaos512.
the class ItemChaosRune method clAddInformation.
@Override
public void clAddInformation(ItemStack stack, World world, List list, boolean advanced) {
ChaosBuff buff = getBuff(stack);
if (buff != null) {
LocalizationHelper loc = SilentGems.localizationHelper;
// Name
TextFormatting nameColor = buff.getPotion() != null && buff.getPotion().isBadEffect() ? TextFormatting.RED : TextFormatting.GOLD;
list.add(nameColor + buff.getLocalizedName(1));
// Description (may not have one)
String desc = " " + buff.getDescription();
if (!desc.isEmpty())
list.add(TextFormatting.DARK_GRAY + desc);
list.add(" " + loc.getItemSubText(itemName, "maxLevel", buff.getMaxLevel()));
list.add(" " + loc.getItemSubText(itemName, "slotsUsed", buff.getSlotsUsed(1)));
String varCost = buff.hasVariableCost() ? loc.getItemSubText(itemName, "variableCost") : "";
list.add(" " + loc.getItemSubText(itemName, "chaosCost", buff.getChaosCost(1, null), varCost));
// Debug
if (KeyTracker.isAltDown()) {
list.add(TextFormatting.DARK_GRAY + String.format("Key: %s", buff.getKey()));
list.add(TextFormatting.DARK_GRAY + String.format("Potion: %s", buff.getPotion()));
list.add(TextFormatting.DARK_GRAY + String.format("Color: %X", buff.getColor()));
}
}
}
Aggregations