本文整理汇总了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;
}
示例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();
}
}
示例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;
}