本文整理汇总了Java中thaumcraft.api.ThaumcraftApi类的典型用法代码示例。如果您正苦于以下问题:Java ThaumcraftApi类的具体用法?Java ThaumcraftApi怎么用?Java ThaumcraftApi使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ThaumcraftApi类属于thaumcraft.api包,在下文中一共展示了ThaumcraftApi类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected static void apply() {
ThaumcraftApi.registerObjectTag(TCItems.infiniCoal.copy(), PrimalCoalScanAspects);
ResearchMakeInfiniCoal.registerResearchItem();
ResearchMoreInfiniCoal.registerResearchItem();
ThaumcraftApi.getCraftingRecipes().add(RecipeMakeInfiniCoal);
ThaumcraftApi.getCraftingRecipes().add(RecipeMoreInfiniCoal);
ThaumcraftApi.addWarpToResearch(ResearchKeyMakeInfiniCoal, WarpResearchMakeInfiniCoal * (TweakCraft.config.primalCoalReallyBadIdea ? 2 : 1));
ThaumcraftApi.addWarpToResearch(ResearchKeyMoreInfiniCoal, WarpResearchMoreInfiniCoal * (TweakCraft.config.primalCoalReallyBadIdea ? 2 : 1));
ThaumcraftApi.addWarpToItem(TCItems.infiniCoal.copy(), WarpCraftInfiniCoal * (TweakCraft.config.primalCoalReallyBadIdea ? 2 : 1));
for (String item : TweakCraft.config.thaumcraftWarpInjection) {
try {
String[] parts = item.split(":");
final String key = parts[0];
final int amount = Integer.parseInt(parts[1], 10);
ThaumcraftApi.addWarpToResearch(key, amount);
}
catch (Exception e) {
Coreder.DEBUGGER.thrown("Invalid specifier in warp injection configuration: " + item, e);
}
}
}
示例2: initThaumic
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
public static void initThaumic() {
recipeQuartz = ThaumcraftApi.addCrucibleRecipe(ResearchLib.QUARTZ_KEY, new ItemStack(ModItems.itemResource, 1, 2), new ItemStack(Items.quartz), new AspectList().add(Aspect.MAGIC, 4).add(Aspect.ELDRITCH, 4));
recipeCrystal = ThaumcraftApi.addCrucibleRecipe(ResearchLib.CRYSTAL_KEY, new ItemStack(ModItems.itemResource, 1, 1), new ItemStack(ModItems.itemResource, 1, 0), new AspectList().add(Aspect.MAGIC, 32).add(Aspect.CRYSTAL, 32));
recipeWardenHelm = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenHelm, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
"XXX", "XOX", " ", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
recipeWardenChest = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenChest, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
"X X", "XOX", "XXX", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
recipeWardenLegs = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenLegs, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
"XXX", "XOX", "X X", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
recipeWardenBoots = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_ARMOR_KEY, new ItemStack(ModItems.itemWardenBoots, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
" ", "XOX", "X X", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
recipeWardenSword = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WARDEN_WEAPON_KEY, new ItemStack(ModItems.itemWardenSword, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
" X ", " X ", " O ", 'X', new ItemStack(ModItems.itemResource, 1, 2), 'O', new ItemStack(ModItems.itemResource, 1, 1));
recipeWaslieHammer = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.WASLIE_HAMMER_KEY, new ItemStack(ModItems.itemWaslieHammer, 1), new AspectList().add(Aspect.ORDER, 125).add(Aspect.ENTROPY, 125).add(Aspect.AIR, 125).add(Aspect.EARTH, 125).add(Aspect.FIRE, 125).add(Aspect.WATER, 125),
"XXX", "XOX", " I ", 'X', new ItemStack(ModItems.itemResource, 1, 1), 'O', new ItemStack(ModItems.itemResource, 1, 2), 'I', new ItemStack(ConfigBlocks.blockMagicalLog));
recipeFocusIllumination = ThaumcraftApi.addArcaneCraftingRecipe(ResearchLib.FOCUS_ILLUMINATION_KEY, new ItemStack(ModItems.itemFocusIllumination, 1), new AspectList().add(Aspect.AIR, 50).add(Aspect.FIRE, 50),
" X ", "XOX", " X ", 'X', new ItemStack(ConfigItems.itemResource, 1, 1), 'O', new ItemStack(ConfigItems.itemFocusFire));
}
示例3: addAspectsDivSigil
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
private static void addAspectsDivSigil() {
if (ExtraUtils.divisionSigil == null) {
return;
}
final ArrayList<Aspect> a = new ArrayList<Aspect>();
a.add(Aspect.AURA);
a.add(Aspect.EXCHANGE);
a.add(Aspect.TOOL);
a.add(Aspect.CRAFT);
a.add(Aspect.ELDRITCH);
a.add(Aspect.SOUL);
Collections.sort(a, new Comparator<Aspect>() {
@Override
public int compare(final Aspect o1, final Aspect o2) {
return o1.getTag().compareTo(o2.getTag());
}
});
final AspectList b = new AspectList();
for (int i = 0; i < a.size(); ++i) {
b.add((Aspect)a.get(i), ThaumcraftHelper.pi[i]);
}
ThaumcraftApi.registerObjectTag(new ItemStack(ExtraUtils.divisionSigil, 1, 32767), b);
}
示例4: minus
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@EventHandler
public void minus(FMLLoadCompleteEvent event) {
for(ResearchCategoryList tab : ResearchCategories.researchCategories.values()){
if(tab != null) {
for (ResearchItem item : tab.research.values()) {
if(item != null){
item.setAutoUnlock();
}
}
}
}
try {
Field warpMap = ThaumcraftApi.class.getDeclaredField("warpMap");
warpMap.setAccessible(true);
HashMap<Object, Integer> warpList = (HashMap<Object, Integer>)warpMap.get(null);
warpList.clear();
}
catch (Exception e){
e.printStackTrace();
}
}
示例5: createFamiliarRecipes
import thaumcraft.api.ThaumcraftApi; //导入依赖的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;
}
示例6: scan
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
public void scan() {
for (Object r : ThaumcraftApi.getCraftingRecipes()) {
if (r instanceof CrucibleRecipe) {
CrucibleRecipe crucibleRecipe = (CrucibleRecipe) r;
ItemStack result = crucibleRecipe.getRecipeOutput();
Object input = crucibleRecipe.catalyst;
if (input instanceof ItemStack) {
addCatalyst(new VanillaStackWrapper(result), (ItemStack)input);
} else if (input instanceof List<?>) {
addCatalyst(new VanillaStackWrapper(result), (ItemStack[]) ((List) input).toArray(new ItemStack[((List) input).size()]));
}
}
}
}
示例7: registerItem
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
/**
* Registers the item info with thaumcraft.
*
* @param itemInfo
* @param aspects
*/
void registerItem( final AEItemInfo itemInfo )
{
// Remove from the add list
this.ITEMS_TO_ADD.remove( itemInfo );
// Ensure it has not already been registered
if( !this.ITEMS_REGISTERED.contains( itemInfo ) )
{
// Add to the registered list
this.ITEMS_REGISTERED.add( itemInfo );
// Register it
ThaumcraftApi.registerObjectTag( itemInfo.itemStack, itemInfo.getFinalAspects() );
}
}
示例8: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// My items
ItemStack DiffusionCore = ThEApi.instance().items().DiffusionCore.getStack();
ItemStack CoalescenceCore = ThEApi.instance().items().CoalescenceCore.getStack();
ItemStack EssentiaProvider = ThEApi.instance().blocks().EssentiaProvider.getStack();
// Set Essentia Provider aspects
AspectList essentiaProviderList = new AspectList();
essentiaProviderList.add( Aspect.MECHANISM, 64 );
essentiaProviderList.add( Aspect.MAGIC, 32 );
essentiaProviderList.add( Aspect.ORDER, 32 );
essentiaProviderList.add( Aspect.EXCHANGE, 16 );
// Essentia Provider recipe
ItemStack[] recipeEssentiaProvider = { cdi.FilterTube, cdi.SalisMundus, CoalescenceCore, cdi.WaterShard, cdi.FilterTube, cdi.SalisMundus,
DiffusionCore, cdi.WaterShard };
// Register Essentia Provider
RecipeRegistry.BLOCK_ESSENTIA_PROVIDER = ThaumcraftApi.addInfusionCraftingRecipe( this.researchKey,
EssentiaProvider, 3, essentiaProviderList, cdi.MEInterface, recipeEssentiaProvider );
}
示例9: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// My items
ItemStack CoalescenceCore = ThEApi.instance().items().CoalescenceCore.getStack();
ItemStack InfusionProvider = ThEApi.instance().blocks().InfusionProvider.getStack();
// Set required aspects for infusion provider
AspectList infusionProviderList = new AspectList();
infusionProviderList.add( Aspect.MECHANISM, 64 );
infusionProviderList.add( Aspect.MAGIC, 32 );
infusionProviderList.add( Aspect.ORDER, 32 );
infusionProviderList.add( Aspect.EXCHANGE, 16 );
// Infusion provider recipe items
ItemStack[] infusionProviderRecipeItems = { cdi.EssentiaMirror, cdi.SalisMundus, CoalescenceCore, cdi.AirShard, cdi.EssentiaMirror,
cdi.SalisMundus, CoalescenceCore, cdi.AirShard };
// Create the infusion provider recipe
RecipeRegistry.BLOCK_INFUSION_PROVIDER = ThaumcraftApi.addInfusionCraftingRecipe( this.researchKey,
InfusionProvider, 4, infusionProviderList, cdi.MEInterface, infusionProviderRecipeItems );
}
示例10: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// My items
ItemStack DiffusionCore = ThEApi.instance().items().DiffusionCore.getStack();
ItemStack CoalescenceCore = ThEApi.instance().items().CoalescenceCore.getStack();
// Set Coalescence Core aspects
AspectList coalescenceAspects = new AspectList();
coalescenceAspects.add( Aspect.WATER, 2 );
coalescenceAspects.add( Aspect.ORDER, 2 );
// Register Coalescence Core
RecipeRegistry.MATERIAL_COALESCENCE_CORE = ThaumcraftApi.addShapelessArcaneCraftingRecipe( this.researchKey,
CoalescenceCore, coalescenceAspects, cdi.QuickSilverDrop, cdi.QuickSilverDrop, cdi.QuickSilverDrop, cdi.OrderShard, cdi.FormationCore );
// Set Diffusion Core aspects
AspectList diffusionAspects = new AspectList();
diffusionAspects.add( Aspect.WATER, 2 );
diffusionAspects.add( Aspect.ENTROPY, 2 );
// Register Diffusion Core
RecipeRegistry.MATERIAL_DIFFUSION_CORE = ThaumcraftApi.addShapelessArcaneCraftingRecipe( this.researchKey,
DiffusionCore, diffusionAspects, cdi.QuickSilverDrop, cdi.QuickSilverDrop, cdi.QuickSilverDrop, cdi.EntropyShard, cdi.AnnihilationCore );
}
示例11: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// My items
ItemStack VisInterface = ThEApi.instance().parts().VisRelay_Interface.getStack();
// Vis interface
AspectList visInterfaceAspectList = new AspectList();
visInterfaceAspectList.add( Aspect.AIR, 2 );
visInterfaceAspectList.add( Aspect.EARTH, 2 );
visInterfaceAspectList.add( Aspect.ENTROPY, 2 );
visInterfaceAspectList.add( Aspect.FIRE, 2 );
visInterfaceAspectList.add( Aspect.ORDER, 2 );
visInterfaceAspectList.add( Aspect.WATER, 2 );
RecipeRegistry.PART_VIS_INTERFACE = ThaumcraftApi.addShapelessArcaneCraftingRecipe( this.researchKey,
VisInterface, visInterfaceAspectList, cdi.BallanceShard, cdi.MEP2P );
}
示例12: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// Backpack item
ItemStack backpack = ThEApi.instance().items().GolemWifiBackpack.getStack();
// Aspects
AspectList aspects = new AspectList();
aspects.add( Aspect.AIR, 6 );
aspects.add( Aspect.FIRE, 4 );
aspects.add( Aspect.ORDER, 3 );
// Recipe
Object[] recipe = new Object[] { "TIT", "NWN", "FCF",
'T', cdi.ThaumiumIngot,
'I', cdi.MEInterfacePart,
'N', cdi.Nitor,
'W', cdi.WirelessReceiver,
'F', cdi.FluixCrystal,
'C', cdi.MECharger };
// Register
RecipeRegistry.ITEM_GOLEM_WIFI_BACKPACK = ThaumcraftApi.addArcaneCraftingRecipe( this.researchKey, backpack, aspects, recipe );
}
示例13: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// My items
ItemStack ArcaneCraftingTerminal = ThEApi.instance().parts().ArcaneCrafting_Terminal.getStack();
// Arcane Crafting Terminal
AspectList actAspectList = new AspectList();
// Set aspects
actAspectList.add( Aspect.AIR, 10 );
actAspectList.add( Aspect.EARTH, 10 );
actAspectList.add( Aspect.ENTROPY, 10 );
actAspectList.add( Aspect.FIRE, 10 );
actAspectList.add( Aspect.ORDER, 10 );
actAspectList.add( Aspect.WATER, 10 );
// Set recipe
Object[] actRecipe = new Object[] { cdi.METerminal, cdi.ArcaneWorkTable, cdi.CalculationProcessor };
// Register
RecipeRegistry.PART_ARCANE_TERMINAL = ThaumcraftApi.addShapelessArcaneCraftingRecipe( this.researchKey,
ArcaneCraftingTerminal, actAspectList, actRecipe );
}
示例14: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// My Items
ItemStack EssVibrationChamber = ThEApi.instance().blocks().EssentiaVibrationChamber.getStack();
ItemStack DiffusionCore = ThEApi.instance().items().DiffusionCore.getStack();
// Chamber aspects
AspectList chamberAspects = new AspectList();
chamberAspects.add( Aspect.WATER, 2 );
chamberAspects.add( Aspect.ENTROPY, 4 );
chamberAspects.add( Aspect.FIRE, 7 );
chamberAspects.add( Aspect.ORDER, 4 );
// Register Chamber
RecipeRegistry.BLOCK_ESSENTIA_VIBRATION_CHAMBER = ThaumcraftApi.addShapelessArcaneCraftingRecipe( this.researchKey,
EssVibrationChamber, chamberAspects, cdi.VibrationChamber, DiffusionCore,
cdi.WardedJar );
}
示例15: registerCrafting
import thaumcraft.api.ThaumcraftApi; //导入依赖的package包/类
@Override
protected void registerCrafting( final CommonDependantItems cdi )
{
// My items
ItemStack dpeStack = ThEApi.instance().blocks().DistillationPatternEncoder.getStack();
// Aspect list
AspectList dpeAspects = new AspectList();
dpeAspects.add( Aspect.ORDER, 5 );
dpeAspects.add( Aspect.ENTROPY, 5 );
dpeAspects.add( Aspect.FIRE, 3 );
// Recipe
Object[] dpeRecipe = new Object[] { "IPI", " T ", "IEI", 'I', cdi.IronIngot, 'P', cdi.IlluminatedPanel, 'T', cdi.Thaumometer, 'E',
cdi.EngineeringProcessor };
// Register
RecipeRegistry.BLOCK_DISTILLATION_PATTERN_ENCODER = ThaumcraftApi.addArcaneCraftingRecipe( this.researchKey,
dpeStack, dpeAspects, dpeRecipe );
}