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


Java ItemWispEssence类代码示例

本文整理汇总了Java中thaumcraft.common.items.ItemWispEssence的典型用法代码示例。如果您正苦于以下问题:Java ItemWispEssence类的具体用法?Java ItemWispEssence怎么用?Java ItemWispEssence使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ItemWispEssence类属于thaumcraft.common.items包,在下文中一共展示了ItemWispEssence类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFamiliarRecipes

import thaumcraft.common.items.ItemWispEssence; //导入依赖的package包/类
public static InfusionRecipe[] createFamiliarRecipes() {
    List<Aspect> aspects = new ArrayList<Aspect>(Aspect.aspects.values());
    InfusionRecipe[] recipes = new InfusionRecipe[aspects.size()];

    ItemWispEssence itemEssence = (ItemWispEssence) ConfigItems.itemWispEssence;
    ItemStack result;
    for (int i = 0; i < aspects.size(); i++) {
        Aspect aspect = aspects.get(i);
        ItemStack wispyEssence = new ItemStack(itemEssence, 1, 0);
        itemEssence.setAspects(wispyEssence, new AspectList().add(aspect, 2));

        result = new ItemStack(RegisteredItems.itemEtherealFamiliar);
        ItemEtherealFamiliar.setFamiliarAspect(result, aspect);

        recipes[i] = ThaumcraftApi.addInfusionCraftingRecipe(Gadomancy.MODID.toUpperCase() + ".ETHEREAL_FAMILIAR",
                result, 4, new AspectList().add(aspect, 10).add(Aspect.AURA, 12).add(Aspect.MAGIC, 18), new ItemStack(ConfigItems.itemAmuletRunic, 1, 0),
                new ItemStack[] { wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 1), wispyEssence, new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 1) });
    }
    return recipes;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:21,代码来源:RegisteredRecipes.java

示例2: onUpdate

import thaumcraft.common.items.ItemWispEssence; //导入依赖的package包/类
@Override
public void onUpdate(){
    super.onUpdate();

    if(redstoneSignal > 0)
        return;

    if(mana >= cost && !supertile.getWorldObj().isRemote && this.ticksExisted % 400 == 0) {
        Thaumcraft.proxy.burst(supertile.getWorldObj(), (double)supertile.xCoord + 0.5D, (double)supertile.yCoord + 0.5D, (double)supertile.zCoord + 0.5D, 1.0F);
        AspectList aspect;
        if(supertile.getWorldObj().rand.nextInt(10) < 4)
            aspect = (new AspectList()).add(Aspect.AURA, 2);
        else {
            Aspect[] aspects = Aspect.aspects.values().toArray(new Aspect[0]);
            aspect = (new AspectList()).add(aspects[supertile.getWorldObj().rand.nextInt(aspects.length)], 2);
        }
        ItemStack ess = new ItemStack(ConfigItems.itemWispEssence);
        ((ItemWispEssence)ess.getItem()).setAspects(ess, aspect);
        dropItem(supertile.getWorldObj(), supertile.xCoord, supertile.yCoord, supertile.zCoord, ess);
        mana -= cost;
        sync();
    }
}
 
开发者ID:SpitefulFox,项目名称:ForbiddenMagic,代码行数:24,代码来源:SubTileEuclidaisy.java

示例3: getItemType

import thaumcraft.common.items.ItemWispEssence; //导入依赖的package包/类
/**
 * Gets the aspect type of the item.
 *
 * @param itemStack
 * @return
 */
public AspectItemType getItemType( final ItemStack itemStack )
{
	// Ensure the stack is not null
	if( itemStack != null )
	{
		// Get the item
		Item item = itemStack.getItem();

		// Ensure the item is not null
		if( item != null )
		{

			// Valid container?
			if( this.isContainerWhitelisted( itemStack ) )
			{
				return AspectItemType.EssentiaContainer;
			}
			// IEssentiaContainerItem?
			else if( item instanceof IEssentiaContainerItem )
			{

				// Crystallized Essentia?
				if( item instanceof ItemCrystalEssence )
				{
					return AspectItemType.CrystallizedEssentia;
				}

				// Wisp essence?
				if( item instanceof ItemWispEssence )
				{
					return AspectItemType.WispEssence;
				}
			}

			// Label?
			if( ( item instanceof ItemResource ) && ( itemStack.getItemDamage() == 13 ) )
			{
				return AspectItemType.JarLabel;
			}

		}

	}

	return AspectItemType.Invalid;
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:53,代码来源:EssentiaItemContainerHelper.java


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