本文整理汇总了Java中thaumcraft.api.aspects.Aspect.getPrimalAspects方法的典型用法代码示例。如果您正苦于以下问题:Java Aspect.getPrimalAspects方法的具体用法?Java Aspect.getPrimalAspects怎么用?Java Aspect.getPrimalAspects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thaumcraft.api.aspects.Aspect
的用法示例。
在下文中一共展示了Aspect.getPrimalAspects方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateEntity
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
@Override
public void updateEntity(){
super.updateEntity();
for(Aspect aspect : Aspect.getPrimalAspects()){
float num = super.consumeVis(aspect, Math.round(EnumEnergy.VIS.getConversionRate()));
naquity += num / EnumEnergy.VIS.getConversionRate();
}
}
示例2: calcOversize
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
private float calcOversize(int neededAspects) {
int overall = 0;
for(Aspect a : Aspect.getPrimalAspects()) {
overall += workAspectList.getAmount(a) - neededAspects;
}
return ((float) overall) / 6F;
}
示例3: checkIfEnoughVis
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
private void checkIfEnoughVis(int start) {
boolean enough = true;
for(Aspect a : Aspect.getPrimalAspects()) {
if(workAspectList.getAmount(a) < start) {
enough = false;
break;
}
}
if(enough) {
isWorking = true;
}
}
示例4: canDrainFromWand
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
private boolean canDrainFromWand(int cap) {
ItemStack stack = getStackInSlot(0);
if(stack == null || !(stack.getItem() instanceof ItemWandCasting)) return false;
AspectList aspects = ((ItemWandCasting) stack.getItem()).getAllVis(stack);
for(Aspect a : Aspect.getPrimalAspects()) {
if(aspects.getAmount(a) < 100) continue;
if(workAspectList.getAmount(a) < cap) return true;
}
return false;
}
示例5: doEntityEffect
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
@Override
public void doEntityEffect(ChunkCoordinates originTile, Entity e) {
EntityPlayer player = (EntityPlayer) e;
for(Aspect a : Aspect.getPrimalAspects()) {
if(a != null && e.worldObj.rand.nextInt(40) == 0) {
if(e.worldObj.rand.nextInt(20) == 0) {
//1 temp warp.
Thaumcraft.addWarpToPlayer(player, 1, true);
}
ScanManager.checkAndSyncAspectKnowledge(player, a, 1);
}
}
}
示例6: onItemUse
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
ForgeDirection dir = ForgeDirection.getOrientation(side);
x += dir.offsetX;
y += dir.offsetY;
z += dir.offsetZ;
if(placeRandomNode(world, x, y, z)) {
int metadata = stack.getItemDamage();
TileNode node = (TileNode) world.getTileEntity(x, y, z);
if(metadata == 0) {
node.setNodeType(NodeType.NORMAL);
node.setNodeModifier(NodeModifier.BRIGHT);
AspectList aspects = new AspectList();
for(Aspect primal : Aspect.getPrimalAspects()) {
aspects.add(primal, 500);
}
node.setAspects(aspects);
node.markDirty();
world.markBlockForUpdate(x, y, z);
} else {
node.setNodeType(NodeType.values()[metadata]);
}
return true;
}
return false;
}