当前位置: 首页>>代码示例>>Java>>正文


Java AspectList.getAspectsSorted方法代码示例

本文整理汇总了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);
}
 
开发者ID:J3FF97,项目名称:Steel-Industries,代码行数:17,代码来源:ItemFocusBasic.java

示例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);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:23,代码来源:ItemExtendedNodeJar.java

示例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);
}
 
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:14,代码来源:ItemFocusBasic.java

示例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);
}
 
开发者ID:Brandomine,项目名称:Augury,代码行数:14,代码来源:ItemFocusBasic.java


注:本文中的thaumcraft.api.aspects.AspectList.getAspectsSorted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。