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


Java Aspect.getPrimalAspects方法代码示例

本文整理汇总了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();
	}
}
 
开发者ID:UnderMybrella,项目名称:Minegate,代码行数:10,代码来源:TileEntityVisNaquity.java

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

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

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

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

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


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