本文整理汇总了Java中thaumcraft.api.aspects.Aspect.isPrimal方法的典型用法代码示例。如果您正苦于以下问题:Java Aspect.isPrimal方法的具体用法?Java Aspect.isPrimal怎么用?Java Aspect.isPrimal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thaumcraft.api.aspects.Aspect
的用法示例。
在下文中一共展示了Aspect.isPrimal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: affect
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
@Override
public boolean affect(World world, INode node) {
AspectList baseList = node.getAspectsBase();
AspectList list = node.getAspects();
for(Aspect a : baseList.getAspects()) {
if(!a.isPrimal()) {
Aspect[] subComponents = a.getComponents();
int initialValue = baseList.getAmount(a);
list.remove(a);
baseList.remove(a);
baseList.add(subComponents[0], initialValue);
list.add(subComponents[0], initialValue);
baseList.add(subComponents[1], initialValue);
list.add(subComponents[1], initialValue);
return true;
}
}
return false;
}
示例2: getSaturation
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
private double getSaturation(AspectType type, Aspect aspect) {
double mult = 1D;
switch (type) {
case WISP:
mult -= 0.2D; //Growing node doesn't get saturated by wisps that fast.
break;
case WISP_ESSENCE:
mult += 0.2D; //Growing node doesn't like essences all the time..
break;
case ASPECT_ORB:
mult -= 0.3D; //Growing node prefers aspects in their most natural form.
break;
case MANA_BEAN:
case CRYSTAL_ESSENCE:
mult += 0.4D; //Mana beans are hard to breed but easy to multiply.. thus growing node doesn't like. Same goes for crystallized essentia
}
if(lastFedAspect != null) {
if(lastFedAspect.equals(aspect)) {
mult += 0.4D;
lastFedRow++;
}
}
lastFedAspect = aspect;
double sat = aspect.isPrimal() ? 1.4D : 1D;
return sat * mult;
}