Search in sources :

Example 1 with ItemGenericEssentiaContainer

use of thaumcraft.api.items.ItemGenericEssentiaContainer in project Railcraft by Railcraft.

the class ThaumcraftApiHelper method makeCrystal.

/**
 * Create a crystal itemstack from a sent aspect.
 * @param aspect
 * @param stackSize stack size
 * @return
 */
public static ItemStack makeCrystal(Aspect aspect, int stackSize) {
    if (aspect == null)
        return null;
    ItemStack is = new ItemStack(ItemsTC.crystalEssence, stackSize, 0);
    ((ItemGenericEssentiaContainer) ItemsTC.crystalEssence).setAspects(is, new AspectList().add(aspect, 1));
    return is;
}
Also used : AspectList(thaumcraft.api.aspects.AspectList) ItemStack(net.minecraft.item.ItemStack) ItemGenericEssentiaContainer(thaumcraft.api.items.ItemGenericEssentiaContainer)

Aggregations

ItemStack (net.minecraft.item.ItemStack)1 AspectList (thaumcraft.api.aspects.AspectList)1 ItemGenericEssentiaContainer (thaumcraft.api.items.ItemGenericEssentiaContainer)1