本文整理汇总了Java中thaumcraft.api.aspects.AspectList.getAspectsSorted方法的典型用法代码示例。如果您正苦于以下问题:Java AspectList.getAspectsSorted方法的具体用法?Java AspectList.getAspectsSorted怎么用?Java AspectList.getAspectsSorted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thaumcraft.api.aspects.AspectList
的用法示例。
在下文中一共展示了AspectList.getAspectsSorted方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addInformation
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
@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);
}
示例2: addInformation
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
@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);
}
示例3: addInformation
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
@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);
}
示例4: addInformation
import thaumcraft.api.aspects.AspectList; //导入方法依赖的package包/类
@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);
}