Java Code Examples for thaumcraft.api.ThaumcraftApi#registerObjectTag()

The following examples show how to use thaumcraft.api.ThaumcraftApi#registerObjectTag() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RegisteredItems.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static void registerItemAspects() {
    AspectList oldAspects = ThaumcraftCraftingManager.getObjectTags(new ItemStack(RegisteredBlocks.blockStoneMachine));

    ThaumcraftApi.registerObjectTag(new ItemStack(Item.getItemFromBlock(RegisteredBlocks.blockStoneMachine)), new int[]{11, 15}, new AspectList());
    ThaumcraftApi.registerObjectTag(new ItemStack(Item.getItemFromBlock(RegisteredBlocks.blockStoneMachine)), new int[]{0}, oldAspects);

    AspectList pylon = new AspectList().add(Aspect.WATER, 10).add(Aspect.MAGIC, 12).add(Aspect.VOID, 4).add(Aspect.MECHANISM, 4);
    ThaumcraftApi.registerObjectTag(new ItemStack(Item.getItemFromBlock(RegisteredBlocks.blockAuraPylon)), new int[]{0}, pylon);
    pylon = new AspectList().add(Aspect.FIRE, 10).add(Aspect.AURA, 12).add(Aspect.MAGIC, 8).add(Aspect.LIGHT, 4).add(Aspect.MECHANISM, 4);
    ThaumcraftApi.registerObjectTag(new ItemStack(Item.getItemFromBlock(RegisteredBlocks.blockAuraPylon)), new int[]{1}, pylon);

    AspectList packager = new AspectList().add(Aspect.TREE, 10).add(Aspect.MECHANISM, 8).add(Aspect.CRAFT, 8).add(Aspect.AURA, 12);
    ThaumcraftApi.registerObjectTag(new ItemStack(Item.getItemFromBlock(RegisteredBlocks.blockStoneMachine)), new int[]{4}, packager);

    AspectList aspect = new AspectList();
    aspect.add(Aspect.MAGIC, 6).add(Aspect.AURA, 12).add(Aspect.ELDRITCH, 4).add(Aspect.VOID, 10);
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemAuraCore), new int[]{0}, aspect.copy());
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemAuraCore), new int[]{1}, aspect.copy().add(Aspect.AIR, 26));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemAuraCore), new int[]{2}, aspect.copy().add(Aspect.FIRE, 26));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemAuraCore), new int[]{3}, aspect.copy().add(Aspect.WATER, 26));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemAuraCore), new int[]{4}, aspect.copy().add(Aspect.EARTH, 26));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemAuraCore), new int[]{5}, aspect.copy().add(Aspect.ORDER, 26));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemAuraCore), new int[]{6}, aspect.copy().add(Aspect.ENTROPY, 26));

    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemPackage, 1, 0), new AspectList().add(Aspect.CLOTH, 2).add(Aspect.BEAST, 2).add(Aspect.ARMOR, 1));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemPackage, 1, 1), new AspectList().add(Aspect.CLOTH, 4));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemFakeLootbag, 1, 0), new AspectList().add(Aspect.CLOTH, 2).add(Aspect.BEAST, 2).add(Aspect.ARMOR, 1));
    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredItems.itemFakeLootbag, 1, 1), new AspectList().add(Aspect.CLOTH, 4));

    ThaumcraftApi.registerObjectTag(new ItemStack(RegisteredBlocks.blockKnowledgeBook), new AspectList().add(Aspect.MIND, 8).add(Aspect.MECHANISM, 4).add(Aspect.MAGIC, 6).add(Aspect.ORDER, 4));
}
 
Example 2
Source File: NetherOres_Thaumcraft.java    From Ex-Aliquo with MIT License 5 votes vote down vote up
protected static void Whenk()
{
		if (Configurations.whenk && Configurations.ninjaFeesh)
		{
			ThaumcraftApi.registerObjectTag(Block.netherrack.blockID, 0, null);
		}
		else
		{
			AspectList rack = (AspectList)ThaumcraftApi.objectTags.get(Arrays.asList(new Integer[] { Integer.valueOf(Block.netherrack.blockID), Integer.valueOf(-1) }));
			ThaumcraftApi.registerObjectTag(NetherOresCore.blockHellfish.blockID, 0, rack);
		}
}
 
Example 3
Source File: BloodMagic.java    From ForbiddenMagic with Do What The F*ck You Want To Public License 5 votes vote down vote up
private static void aspectBloodItem(String target, int damage, AspectList list) {
    try {
        Item item = Compat.getItem("AWWayofTime", target);
        ThaumcraftApi.registerObjectTag(new ItemStack(item, 1, damage), list);
    } catch (Exception e) {
        FMLLog.log(Level.INFO, e, "Forbidden Magic was unable to add aspects to " + target);
    }
}
 
Example 4
Source File: Thaumcraft.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void postInit(){
    ThaumcraftApi.registerObjectTag(Names.INGOT_IRON_COMPRESSED, new AspectList().add(Aspect.METAL, 8).add(Aspect.AIR, 1));
    registerPlasticAspects(ItemPlasticPlants.SQUID_PLANT_DAMAGE, Aspect.DARKNESS);
    registerPlasticAspects(ItemPlasticPlants.FIRE_FLOWER_DAMAGE, Aspect.FIRE);
    registerPlasticAspects(ItemPlasticPlants.CREEPER_PLANT_DAMAGE, Aspect.ENERGY);
    registerPlasticAspects(ItemPlasticPlants.SLIME_PLANT_DAMAGE, Aspect.SLIME);
    registerPlasticAspects(ItemPlasticPlants.RAIN_PLANT_DAMAGE, Aspect.WATER);
    registerPlasticAspects(ItemPlasticPlants.ENDER_PLANT_DAMAGE, Aspect.ELDRITCH);
    registerPlasticAspects(ItemPlasticPlants.LIGHTNING_PLANT_DAMAGE, Aspect.WEATHER);
    //registerPlasticAspects(ItemPlasticPlants.ADRENALINE_PLANT_DAMAGE , Aspect.
    registerPlasticAspects(ItemPlasticPlants.POTION_PLANT_DAMAGE, Aspect.POISON);
    registerPlasticAspects(ItemPlasticPlants.REPULSION_PLANT_DAMAGE, Aspect.ENTROPY);
    registerPlasticAspects(ItemPlasticPlants.HELIUM_PLANT_DAMAGE, Aspect.LIGHT);
    registerPlasticAspects(ItemPlasticPlants.CHOPPER_PLANT_DAMAGE, Aspect.AIR);
    //registerPlasticAspects(ItemPlasticPlants.MUSIC_PLANT_DAMAGE , Aspect.
    registerPlasticAspects(ItemPlasticPlants.PROPULSION_PLANT_DAMAGE, Aspect.MOTION);
    registerPlasticAspects(ItemPlasticPlants.FLYING_FLOWER_DAMAGE, Aspect.FLIGHT);

    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.turbineBlade), new AspectList().add(Aspect.GREED, 2).add(Aspect.METAL, 3).add(Aspect.MOTION, 2).add(Aspect.ENERGY, 4));

    AspectList transAndCapAspects = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.PLANT, 2).add(Aspect.METAL, 6);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.transistor), transAndCapAspects);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.capacitor), transAndCapAspects);

    AspectList pcbAspects = new AspectList().add(Aspect.ENERGY, 1).add(Aspect.PLANT, 2).add(Aspect.METAL, 6);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.emptyPCB), pcbAspects);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.unassembledPCB), pcbAspects);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.airCanister), new AspectList().add(Aspect.METAL, 30).add(Aspect.ENERGY, 4));

    /*  for(Item item : pcItems) {
          ThaumcraftApi.registerComplexObjectTag(new ItemStack(item, 1, OreDictionary.WILDCARD_VALUE), new AspectList());
      }
      for(Block block : pcBlocks) {
          ThaumcraftApi.registerComplexObjectTag(new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE), new AspectList());
      }*/
}
 
Example 5
Source File: AdvancedMod.java    From AdvancedMod with GNU General Public License v3.0 4 votes vote down vote up
@Optional.Method(modid = "Thaumcraft")
private void loadThaumcraft(){
    ThaumcraftApi.registerObjectTag(new ItemStack(ModBlocks.dutchFlag), new AspectList().add(Aspect.AIR, 5));
}
 
Example 6
Source File: Thaumcraft.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
private void registerPlasticAspects(int meta, AspectList aspects){
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.plasticPlant, 1, meta), aspects.add(Aspect.PLANT, 2));
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.plastic, 1, meta), aspects);
}