protected void addVisCostTooltip(
     AspectList cost, ItemStack stack, EntityPlayer player, List list, boolean par4) {
   for (Aspect aspect : cost.getAspectsSorted()) {
     float amount = cost.getAmount(aspect) / 100.0F;
     list.add(
         " " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount);
   }
 }
예제 #2
0
 @Override
 public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
   AspectList al = this.getVisCost();
   if (al != null && al.size() > 0) {
     list.add(
         StatCollector.translateToLocal(
             isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1"));
     for (Aspect aspect : al.getAspectsSorted()) {
       DecimalFormat myFormatter = new DecimalFormat("#####.##");
       String amount = myFormatter.format(al.getAmount(aspect) / 100f);
       list.add(" \u00A7" + aspect.getChatcolor() + aspect.getName() + "\u00A7r x " + amount);
     }
   }
 }