Java Code Examples for thaumcraft.api.aspects.AspectList#getAspectsSorted()
The following examples show how to use
thaumcraft.api.aspects.AspectList#getAspectsSorted() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ItemExtendedNodeJar.java From Gadomancy with GNU Lesser General Public License v3.0 | 6 votes |
@Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { String desc = "ยง9" + StatCollector.translateToLocal("nodetype." + getNodeType(stack) + ".name"); if(getExtendedNodeType(stack) != null) { desc = desc + ", " + StatCollector.translateToLocal("gadomancy.nodes." + getExtendedNodeType(stack)); } if (getNodeModifier(stack) != null) { desc = desc + ", " + StatCollector.translateToLocal("nodemod." + getNodeModifier(stack) + ".name"); } list.add(desc); AspectList aspects = getAspects(stack); if ((aspects != null) && (aspects.size() > 0)) { for (Aspect tag : aspects.getAspectsSorted()) { if (Thaumcraft.proxy.playerKnowledge.hasDiscoveredAspect(player.getCommandSenderName(), tag)) { list.add(tag.getName() + " x " + aspects.getAmount(tag)); } else { list.add(StatCollector.translateToLocal("tc.aspect.unknown")); } } } super.addInformation(stack, player, list, par4); }
Example 2
Source File: ItemFocusBasic.java From AdvancedMod with GNU General Public License v3.0 | 5 votes |
@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); } } }
Example 3
Source File: ItemFocusBasic.java From Chisel-2 with GNU General Public License v2.0 | 5 votes |
@Override public void addInformation(ItemStack stack,EntityPlayer player, List list, boolean par4) { AspectList al = this.getVisCost(stack); if (al!=null && al.size()>0) { list.add(StatCollector.translateToLocal(isVisCostPerTick(stack)?"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); } } addFocusInformation(stack,player,list,par4); }
Example 4
Source File: ItemFocusBasic.java From GardenCollection with MIT License | 5 votes |
@Override public void addInformation(ItemStack stack,EntityPlayer player, List list, boolean par4) { AspectList al = this.getVisCost(stack); if (al!=null && al.size()>0) { list.add(StatCollector.translateToLocal(isVisCostPerTick(stack)?"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); } } addFocusInformation(stack,player,list,par4); }
Example 5
Source File: ItemBaseFocus.java From Electro-Magic-Tools with GNU General Public License v3.0 | 5 votes |
@SuppressWarnings({"rawtypes", "unchecked"}) @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { AspectList cost = getVisCost(); if (cost != null && cost.size() > 0) { list.add(StatCollector.translateToLocal(isVisCostPerTick() ? "item.Focus.cost2" : "item.Focus.cost1")); for (Aspect aspect : cost.getAspectsSorted()) { float amount = cost.getAmount(aspect) / 100.0F; list.add(" " + '\u00a7' + aspect.getChatcolor() + aspect.getName() + '\u00a7' + "r x " + amount); } } }
Example 6
Source File: ItemFocusBasic.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
@Override public void addInformation(ItemStack stack,EntityPlayer player, List list, boolean par4) { AspectList al = this.getVisCost(stack); if (al!=null && al.size()>0) { list.add(StatCollector.translateToLocal(isVisCostPerTick(stack)?"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); } } addFocusInformation(stack,player,list,par4); }
Example 7
Source File: ItemFocusBasic.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack,EntityPlayer player, List list, boolean par4) { AspectList al = this.getVisCost(stack); if (al!=null && al.size()>0) { list.add(StatCollector.translateToLocal(isVisCostPerTick(stack)?"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); } } addFocusInformation(stack,player,list,par4); }