public static void applyObjectTags() {
    ObjectTags tags =
        new ObjectTags().add(EnumTag.LIFE, 1).add(EnumTag.EARTH, 2).add(EnumTag.CRYSTAL, 1);
    ThaumcraftApi.registerObjectTag(PinkGum1.blockID, -1, tags);

    tags = new ObjectTags().add(EnumTag.LIFE, 1).add(EnumTag.ROCK, 2).add(EnumTag.CRYSTAL, 1);
    ThaumcraftApi.registerObjectTag(BlueGum1.blockID, -1, tags);
  }
Exemplo n.º 2
0
  private void addResearchAndRecipe(
      ResearchItem research,
      int[] meta,
      AspectList aspects,
      IRecipe[] recipes,
      ResearchPage... pages) {
    ThaumcraftApi.registerObjectTag(research.icon_item, meta, aspects);
    /*
    ThaumcraftApi.registerObjectTag(new ItemStack(this.thaumicAnalyzer), new int[] {
    				0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
    		}, new AspectList().
    				add(Aspect.MIND, 4).
    				add(Aspect.METAL, 2).
    				add(Aspect.MECHANISM, 10).
    				add(Aspect.MAGIC, 7)
    );
    */

    List<ResearchPage> allPages = new ArrayList<ResearchPage>(Arrays.asList(pages));
    for (IRecipe recipe : recipes) {
      GameRegistry.addRecipe(recipe);
      allPages.add(new ResearchPage(recipe));
    }
    research.tags.add(aspects);
    research.setPages(allPages.toArray(new ResearchPage[allPages.size()])).registerResearchItem();
  }
Exemplo n.º 3
0
 /**
  * Used to assign aspects to the given item/block. Attempts to automatically generate aspect tags
  * by checking registered recipes. Here is an example of the declaration for pistons:
  *
  * <p><i>ThaumcraftApi.registerComplexObjectTag(new ItemStack(Blocks.cobblestone), (new
  * AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.MOTION, 4));</i>
  *
  * @param item, pass OreDictionary.WILDCARD_VALUE to meta if all damage values of this item/block
  *     should have the same aspects
  * @param aspects A ObjectTags object of the associated aspects
  */
 public static void registerComplexObjectTag(ItemStack item, AspectList aspects) {
   if (!exists(item.getItem(), item.getItemDamage())) {
     AspectList tmp = ThaumcraftApiHelper.generateTags(item.getItem(), item.getItemDamage());
     if (tmp != null && tmp.size() > 0) {
       for (Aspect tag : tmp.getAspects()) {
         aspects.add(tag, tmp.getAmount(tag));
       }
     }
     registerObjectTag(item, aspects);
   } else {
     AspectList tmp = ThaumcraftApiHelper.getObjectAspects(item);
     for (Aspect tag : aspects.getAspects()) {
       tmp.merge(tag, tmp.getAmount(tag));
     }
     registerObjectTag(item, tmp);
   }
 }
Exemplo n.º 4
0
 /**
  * Used to assign aspects to the given item/block. Attempts to automatically generate aspect tags
  * by checking registered recipes. Here is an example of the declaration for pistons:
  *
  * <p><i>ThaumcraftApi.registerComplexObjectTag(Block.pistonBase.blockID, 0, (new
  * ObjectTags()).add(EnumTag.MECHANISM, 2).add(EnumTag.MOTION, 4));</i>
  *
  * @param id
  * @param meta pass -1 if all damage values of this item/block should have the same aspects
  * @param aspects A ObjectTags object of the associated aspects
  */
 public static void registerComplexObjectTag(int id, int meta, ObjectTags aspects) {
   if (!exists(id, meta)) {
     ObjectTags tmp = ThaumcraftApiHelper.generateTags(id, meta);
     if (tmp != null && tmp.size() > 0) {
       for (EnumTag tag : tmp.getAspects()) {
         aspects.add(tag, tmp.getAmount(tag));
       }
     }
     registerObjectTag(id, meta, aspects);
   } else {
     ObjectTags tmp = ThaumcraftApiHelper.getObjectTags(new ItemStack(id, 1, meta));
     for (EnumTag tag : aspects.getAspects()) {
       tmp.merge(tag, tmp.getAmount(tag));
     }
     registerObjectTag(id, meta, tmp);
   }
 }
Exemplo n.º 5
0
  public static void addAspects(ItemStack is, AspectList aspects) {
    AspectList has = ThaumcraftApi.objectTags.get(Arrays.asList(is.getItem(), is.getItemDamage()));

    if (has != null) {
      for (Aspect as : has.aspects.keySet()) {
        aspects.merge(as, has.getAmount(as));
      }
    }
    clearNullAspects(aspects);
    ThaumcraftApi.registerObjectTag(is, new int[] {is.getItemDamage()}, aspects);
    DragonAPICore.log("Registering " + is + " aspects " + aspectsToString(aspects));
  }
Exemplo n.º 6
0
  /** Contains a helper function to avoid overwriting existing aspects. */
  public static void addAspects(ItemStack is, Object... aspects) {
    if (aspects.length % 2 != 0) {
      DragonAPICore.logError(
          "Could not add aspects to " + is + ": You must specify a level for every aspect!");
      ReikaJavaLibrary.dumpStack();
      return;
    }
    AspectList has = ThaumcraftApi.objectTags.get(Arrays.asList(is.getItem(), is.getItemDamage()));
    AspectList ot = getAspectList(aspects);

    if (has != null) {
      for (Aspect as : has.aspects.keySet()) {
        ot.merge(as, has.getAmount(as));
      }
    }
    clearNullAspects(ot);
    ThaumcraftApi.registerObjectTag(is, ot);
    DragonAPICore.log("Registering " + is + " aspects " + aspectsToString(ot));
  }
Exemplo n.º 7
0
  public static void abracadabra() {
    ULTRA_DEATH =
        new Aspect(
            "terminus",
            0xb90000,
            new Aspect[] {Aspect.GREED, Aspect.ELDRITCH},
            new ResourceLocation("avaritia", "textures/misc/terminus.png"),
            771);

    LudicrousItems.akashic_record = new ItemAkashicRecord();
    GameRegistry.registerItem(LudicrousItems.akashic_record, "Akashic_Record");

    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.resource, 1, 1),
        new AspectList().add(ULTRA_DEATH, 1).add(Aspect.ENERGY, 8).add(Aspect.CRYSTAL, 32));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.resource, 1, 4),
        new AspectList().add(ULTRA_DEATH, 2).add(Aspect.METAL, 12).add(Aspect.ENERGY, 12));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.resource, 1, 5),
        new AspectList().add(ULTRA_DEATH, 5).add(Aspect.EXCHANGE, 12));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.resource, 1, 6),
        new AspectList().add(ULTRA_DEATH, 16).add(Aspect.ELDRITCH, 64));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousBlocks.neutron_collector, 1, OreDictionary.WILDCARD_VALUE),
        new AspectList()
            .add(ULTRA_DEATH, 5)
            .add(Aspect.METAL, 64)
            .add(Aspect.ENERGY, 64)
            .add(Aspect.MECHANISM, 64));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 0),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.METAL, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 1),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.METAL, 100).add(Aspect.GREED, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 2),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.SENSES, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 3),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.MECHANISM, 100).add(Aspect.ENERGY, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 4),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.CRYSTAL, 100).add(Aspect.ORDER, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 5),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.METAL, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 6),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.METAL, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 7),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.METAL, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.singularity, 1, 8),
        new AspectList().add(ULTRA_DEATH, 3).add(Aspect.METAL, 100));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(LudicrousItems.infinity_sword),
        new AspectList()
            .add(ULTRA_DEATH, 60)
            .add(Aspect.WEAPON, 999)
            .add(Aspect.DEATH, 999)
            .add(Aspect.ELDRITCH, 100));
    ThaumcraftApi.registerComplexObjectTag(
        new ItemStack(LudicrousItems.skull_sword),
        new AspectList()
            .add(ULTRA_DEATH, 1)
            .add(Aspect.FIRE, 2)
            .add(Aspect.CRYSTAL, 16)
            .add(Aspect.DEATH, 4));

    WAND_ROD_NEUTRONIUM =
        new WandRod(
            "infinity",
            9999999,
            new ItemStack(LudicrousBlocks.resource_block, 1, 0),
            9999,
            new CheatyWandUpdate(),
            new ResourceLocation("avaritia", "textures/models/wand_rod_neutronium.png"));
    WAND_ROD_NEUTRONIUM.setGlowing(true);
    WAND_CAP_CRYSTAL = new WandCap("matrix", 0.0F, new ItemStack(Blocks.command_block), 1000);
    WAND_CAP_CRYSTAL.setTexture(
        new ResourceLocation("avaritia", "textures/models/wand_cap_crystal.png"));

    ItemStack wand = new ItemStack(ConfigItems.itemWandCasting, 1, 9000);
    ((ItemWandCasting) ConfigItems.itemWandCasting).setRod(wand, WAND_ROD_NEUTRONIUM);
    ((ItemWandCasting) ConfigItems.itemWandCasting).setCap(wand, WAND_CAP_CRYSTAL);

    ExtremeCraftingManager.getInstance()
        .addRecipe(
            wand,
            "      C  ",
            "     CIC ",
            "     NIIC",
            "    NINC ",
            "   NXN   ",
            " CNIN    ",
            "CIIN     ",
            " CIC     ",
            "  C      ",
            'I',
            new ItemStack(LudicrousItems.resource, 1, 6),
            'C',
            new ItemStack(LudicrousItems.resource, 1, 1),
            'N',
            new ItemStack(LudicrousItems.resource, 1, 4),
            'X',
            new ItemStack(LudicrousBlocks.resource_block, 1, 1));

    if (Loader.isModLoaded("ThaumicTinkerer")) {
      try {
        boolean kami =
            Class.forName("thaumic.tinkerer.common.core.handler.ConfigHandler")
                .getField("enableKami")
                .getBoolean(null);
        if (kami) {
          Item kamiResource = Compat.getItem("ThaumicTinkerer", "kamiResource");
          Grinder.catalyst.getInput().add(new ItemStack(kamiResource, 1, 2));
        }
      } catch (Exception e) {
        Lumberjack.log(
            Level.INFO, e, "Avaritia couldn't find the last research it needs to unlock Ichor.");
      }
    }
  }
Exemplo n.º 8
0
  private static void setupItemAspects() {
    ItemStack item;
    AspectList list;

    ThaumcraftApi.registerObjectTag(
        new ItemStack(Items.clock),
        new AspectList(new ItemStack(Items.clock)).add((Aspect) aspectTime, 4));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Items.repeater),
        new AspectList(new ItemStack(Items.repeater)).add((Aspect) aspectTime, 2));

    list = new AspectList(new ItemStack(Blocks.log));
    for (int i = 1; i <= 8; i++) {
      item = ItemInterface.getItemStack("log" + i);
      if (item != null) {
        ThaumcraftApi.registerObjectTag(item, list);
      }
    }

    list = new AspectList(new ItemStack(Blocks.planks));
    for (int i = 1; i <= 2; i++) {
      item = ItemInterface.getItemStack("planks" + i);
      if (item != null) {
        ThaumcraftApi.registerObjectTag(item, list);
      }
    }

    list = new AspectList().add(Aspect.ORDER, 5).add(Aspect.ARMOR, 2).add(Aspect.BEAST, 1);
    item = new ItemStack(Config.fHiveBlock);
    ThaumcraftApi.registerObjectTag(item, list);
    ThaumcraftApi.registerObjectTag(new ItemStack(Config.hive), list);

    list = new AspectList().add(Aspect.LIGHT, 1);
    item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "candle"));
    ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);

    list = new AspectList().add(Aspect.DARKNESS, 1);
    item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "stump"));
    ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);

    list = new AspectList(new ItemStack(Blocks.glass)).add(Aspect.SENSES, 1);
    item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "glass"));
    ThaumcraftApi.registerObjectTag(item, list);

    list = new AspectList().add(Aspect.EARTH, 2).add(Aspect.WATER, 2);
    item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "soil"));
    ThaumcraftApi.registerObjectTag(item, new int[] {1}, list);

    list = new AspectList(new ItemStack(Blocks.leaves));
    item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
    ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);

    list = new AspectList(new ItemStack(Blocks.sapling));
    item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
    ThaumcraftApi.registerObjectTag(item, list);

    list = new AspectList() /* .add(Aspect.SEED, 1) */.add(Aspect.PLANT, 1);
    item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
    ThaumcraftApi.registerObjectTag(item, list);

    list = new AspectList().add(Aspect.CRYSTAL, 1).add(Aspect.EARTH, 2);
    item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
    ThaumcraftApi.registerObjectTag(
        new ItemStack(item.getItem(), 1, ForestryHelper.BlockResource.APATITE.ordinal()),
        list.copy());
    item = ItemInterface.getItemStack(ForestryHelper.Name, "apatite");
    ThaumcraftApi.registerObjectTag(
        new ItemStack(item.getItem(), 1, item.getItemDamage()), list.copy().add(Aspect.CRYSTAL, 2));

    list = new AspectList().add(Aspect.MOTION, 2).add(Aspect.FLIGHT, 1);
    item = ItemInterface.getItemStack("beeDroneGE");
    ThaumcraftApi.registerObjectTag(item, list);
    list = list.copy().add(Aspect.GREED, 2).add(Aspect.EXCHANGE, 1);
    item = ItemInterface.getItemStack("beePrincessGE");
    ThaumcraftApi.registerObjectTag(item, list);
    item = ItemInterface.getItemStack("beeQueenGE");
    ThaumcraftApi.registerObjectTag(item, list);
    list = new AspectList().add(Aspect.LIFE, 2).add(Aspect.EXCHANGE, 5);
    item = ItemInterface.getItemStack("beeLarvaeGE");
    ThaumcraftApi.registerObjectTag(item, list);

    item = ItemInterface.getItemStack("scoop");
    list = new AspectList(new ItemStack(item.getItem(), 1, 0)).add(Aspect.TOOL, 2);
    ThaumcraftApi.registerComplexObjectTag(item, list);

    item = ItemInterface.getItemStack("grafter");
    list =
        new AspectList(new ItemStack(item.getItem(), 1, item.getItemDamage())).add(Aspect.TOOL, 2);
    ThaumcraftApi.registerComplexObjectTag(item, list);

    item = ItemInterface.getItemStack("grafterProven");
    list = list.copy().add(Aspect.TOOL, 2).add(Aspect.EXCHANGE, 3);
    ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1, item.getItemDamage()), list);

    list = new AspectList().add(Aspect.TRAP, 2);
    ThaumcraftApi.registerObjectTag("beeComb", list);

    list = new AspectList().add(Aspect.SLIME, 1);
    item = ItemInterface.getItemStack("propolis");
    ThaumcraftApi.registerObjectTag(
        new ItemStack(item.getItem(), 1, ForestryHelper.Propolis.NORMAL.ordinal()), list);
    ThaumcraftApi.registerObjectTag(
        new ItemStack(item.getItem(), 1, ForestryHelper.Propolis.SILKY.ordinal()),
        list.copy().add(Aspect.SLIME, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(item.getItem(), 1, ForestryHelper.Propolis.PULSATING.ordinal()),
        list.copy().add(Aspect.ELDRITCH, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.propolis, 1, PropolisType.UNSTABLE.ordinal()),
        list.copy().add(Aspect.ENTROPY, 1).add(Aspect.EXCHANGE, 1));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.propolis, 1, PropolisType.AIR.ordinal()),
        list.copy().add(Aspect.AIR, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.propolis, 1, PropolisType.WATER.ordinal()),
        list.copy().add(Aspect.WATER, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.propolis, 1, PropolisType.FIRE.ordinal()),
        list.copy().add(Aspect.FIRE, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.propolis, 1, PropolisType.EARTH.ordinal()),
        list.copy().add(Aspect.EARTH, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.propolis, 1, PropolisType.ORDER.ordinal()),
        list.copy().add(Aspect.ORDER, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.propolis, 1, PropolisType.CHAOS.ordinal()),
        list.copy().add(Aspect.ENTROPY, 2));

    list = new AspectList().add(Aspect.PLANT, 2);
    item = ItemInterface.getItemStack("pollen");
    ThaumcraftApi.registerObjectTag(
        new ItemStack(item.getItem(), 1, ForestryHelper.Pollen.NORMAL.ordinal()), list);
    ThaumcraftApi.registerObjectTag(
        new ItemStack(item.getItem(), 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), list.copy());
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.pollen, 1, PollenType.UNUSUAL.ordinal()),
        list.copy().add(Aspect.MAGIC, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.pollen, 1, PollenType.PHASED.ordinal()),
        list.copy().add((Aspect) aspectTime, 2));

    list = new AspectList().add(Aspect.ORDER, 1);
    item = ItemInterface.getItemStack("beeswax");
    ThaumcraftApi.registerObjectTag(
        item, new int[] {item.getItemDamage()}, list.copy().add(Aspect.ORDER, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.wax, 1, WaxType.MAGIC.ordinal()), list.copy().add(Aspect.MAGIC, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.wax, 1, WaxType.SOUL.ordinal()), list.copy().add(Aspect.SOUL, 2));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(Config.wax, 1, WaxType.AMNESIC.ordinal()), list.copy().add(Aspect.MIND, 2));

    list = new AspectList().add(Aspect.EXCHANGE, 2).add(Aspect.LIFE, 2);
    item = ItemInterface.getItemStack("honeyDrop");
    ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);

    list = new AspectList().add(Aspect.LIFE, 2).add(Aspect.ENERGY, 2);
    item = ItemInterface.getItemStack("honeydew");
    ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);

    list = new AspectList().add(Aspect.GREED, 1).add(Aspect.LIFE, 4);
    item = ItemInterface.getItemStack("royalJelly");
    ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);

    list = new AspectList().add(Aspect.FIRE, 1).add(Aspect.TRAP, 2);
    item = ItemInterface.getItemStack("phosphor");
    ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);

    item = Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE);
    ThaumcraftApi.registerObjectTag(
        item, new int[] {item.getItemDamage()}, new AspectList().add(Aspect.LIFE, 6));

    item = Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE);
    ThaumcraftApi.registerObjectTag(
        item, new int[] {item.getItemDamage()}, new AspectList().add(Aspect.DEATH, 6));

    item = Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY);
    ThaumcraftApi.registerObjectTag(
        item, new int[] {item.getItemDamage()}, new AspectList().add(Aspect.ARMOR, 6));

    item = Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME);
    ThaumcraftApi.registerObjectTag(
        item,
        new int[] {item.getItemDamage()},
        new AspectList().add(Aspect.VOID, 6).add((Aspect) aspectTime, 8));
  }
Exemplo n.º 9
0
 public static void clearAspects(ItemStack is) {
   AspectList ot = new AspectList();
   ThaumcraftApi.registerObjectTag(is, new int[] {is.getItemDamage()}, ot);
 }
Exemplo n.º 10
0
  private static void addAspects() {
    // TODO more aspects to everything!
    // Items
    ThaumcraftApi.registerObjectTag(
        ii(BotanyItems.wand_focus_watering),
        new int[] {0},
        new AspectList().add(Aspect.WATER, 10).add(Aspect.MAGIC, 5).add(Aspect.CROP, 3));
    ThaumcraftApi.registerObjectTag(
        ii(BotanyItems.gardeners_cap),
        new int[] {0},
        new AspectList()
            .add(Aspect.ARMOR, 5)
            .add(ArcaneBotany.aspectHortus, 5)
            .add(Aspect.PLANT, 2));
    ThaumcraftApi.registerObjectTag(
        ii(BotanyItems.gardeners_chest),
        new int[] {0},
        new AspectList()
            .add(Aspect.ARMOR, 5)
            .add(ArcaneBotany.aspectHortus, 5)
            .add(Aspect.PLANT, 2));
    ThaumcraftApi.registerObjectTag(
        ii(BotanyItems.gardeners_pants),
        new int[] {0},
        new AspectList()
            .add(Aspect.ARMOR, 5)
            .add(ArcaneBotany.aspectHortus, 5)
            .add(Aspect.PLANT, 2));
    ThaumcraftApi.registerObjectTag(
        ii(BotanyItems.gardeners_boots),
        new int[] {0},
        new AspectList()
            .add(Aspect.ARMOR, 5)
            .add(ArcaneBotany.aspectHortus, 5)
            .add(Aspect.PLANT, 2));

    ThaumcraftApi.registerObjectTag(
        ii(BotanyItems.gardenomicon),
        new int[] {0},
        new AspectList()
            .add(Aspect.CLOTH, 5)
            .add(ArcaneBotany.aspectHortus, 5)
            .add(Aspect.CRAFT, 2)
            .add(Aspect.PLANT, 3));
    ThaumcraftApi.registerObjectTag(
        ii(BotanyItems.inkBottle),
        new int[] {0},
        new AspectList().add(Aspect.WATER, 1).add(ArcaneBotany.aspectHortus, 1));

    // Blocks
    ThaumcraftApi.registerObjectTag(
        ib(BotanyBlocks.scribers_pitcher),
        new int[] {0},
        new AspectList()
            .add(Aspect.DARKNESS, 5)
            .add(Aspect.PLANT, 5)
            .add(ArcaneBotany.aspectHortus, 2));
    ThaumcraftApi.registerObjectTag(
        ib(BotanyBlocks.nitor_root),
        new int[] {0},
        new AspectList()
            .add(Aspect.LIGHT, 5)
            .add(Aspect.PLANT, 5)
            .add(ArcaneBotany.aspectHortus, 2));
    ThaumcraftApi.registerObjectTag(
        ib(BotanyBlocks.golem_fern),
        new int[] {0},
        new AspectList()
            .add(Aspect.TRAVEL, 5)
            .add(Aspect.CRYSTAL, 2)
            .add(ArcaneBotany.aspectHortus, 2));
    ThaumcraftApi.registerObjectTag(
        ib(BotanyBlocks.tainted_hedge),
        new int[] {0},
        new AspectList()
            .add(Aspect.AURA, 5)
            .add(Aspect.DARKNESS, 2)
            .add(ArcaneBotany.aspectHortus, 2));
    ThaumcraftApi.registerObjectTag(
        ib(BotanyBlocks.ghast_amaryllis),
        new int[] {0},
        new AspectList()
            .add(Aspect.BEAST, 5)
            .add(Aspect.SENSES, 2)
            .add(ArcaneBotany.aspectHortus, 2));

    // TODO //Mobs
  }
Exemplo n.º 11
0
  @SuppressWarnings("unchecked")
  public static void setup() {
    //	Create Thaumonomicon Page
    ResearchCategories.registerCategory(catName, null, icon, back, null);

    //	ResearchCategoryList	THAUMATURGY=ResearchCategories.getResearchList("THAUMATURGY");
    ResearchCategoryList ALCHEMY = ResearchCategories.getResearchList("ALCHEMY");
    //	ResearchCategoryList	ARTIFICE=ResearchCategories.getResearchList("ARTIFICE");
    ResearchItem crucRes = ALCHEMY.research.get("CRUCIBLE");

    copy(crucRes, "TC.CRUCIBLE", catName, 0, 0).setHidden().registerResearchItem();
    //		copy(crucRes,"TC.CRUCIBLE",catName,0,0).setHidden().registerResearchItem();
    copy(
            ResearchCategories.getResearchList("ALCHEMY").research.get("METALLURGY"),
            "TS.ALCHEMY",
            catName,
            -3,
            -5)
        .setHidden()
        .registerResearchItem();
    //
    //	copy(ResearchCategories.getResearchList("ALCHEMY").research.get("METALLURGY"),"TS.ALCHEMY",catName,-3,-5).setHidden().registerResearchItem();

    //	Register items and aspects <???>
    ThaumcraftApi.registerObjectTag(
        new ItemStack(TSItems.arcane_coal, 1, OreDictionary.WILDCARD_VALUE),
        new AspectList().add(Aspect.FIRE, 16).add(Aspect.ORDER, 8).add(Aspect.LIGHT, 6));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(TSItems.arcane_coal_block, 1, OreDictionary.WILDCARD_VALUE),
        new AspectList().add(Aspect.FIRE, 16).add(Aspect.ORDER, 8).add(Aspect.LIGHT, 6));
    ThaumcraftApi.registerObjectTag(
        new ItemStack(TSItems.arcane_torch_dispenser, 1, OreDictionary.WILDCARD_VALUE),
        new AspectList().add(Aspect.FIRE, 16).add(Aspect.ORDER, 8).add(Aspect.LIGHT, 20));
    //		ThaumcraftApi.registerObjectTag(new
    // ItemStack(TSItems.arcane_torch_dispenser,1,OreDictionary.WILDCARD_VALUE), new
    // AspectList().add(Aspect.FIRE, 16).add(Aspect.ORDER, 8).add(Aspect.LIGHT, 6));

    //	Crucible Recipe
    //	Clean Clay - Costs Permutatio(EXCHANGE)String

    ItemStack clay3Rec_cat[] = {
      new ItemStack(Blocks.clay, 1, 0),
      new ItemStack(Blocks.hardened_clay, 1, 0),
      new ItemStack(Blocks.stained_hardened_clay, 1, 0)
    };
    CrucibleRecipe clay3Rec =
        new CrucibleRecipe(
            new String[] {"TS.r.Entropy_clay"},
            new ItemStack(Items.clay_ball, 3, 0),
            clay3Rec_cat,
            new AspectList().add(Aspect.ENTROPY, 1));

    ItemStack arcaneCoalS_cat[] = {new ItemStack(TSItems.arcane_coal, 1, 0)};
    CrucibleRecipe arcaneCoalS_Rec =
        new CrucibleRecipe(
            new String[] {"TS.ALCHEMY"},
            new ItemStack(TSItems.arcane_coalS, 1, 0),
            arcaneCoalS_cat,
            new AspectList()
                .add(Aspect.FIRE, 32)
                .add(Aspect.ENERGY, 32)
                .add(Aspect.EXCHANGE, 20)
                .add(Aspect.LIGHT, 16));

    //	Define Recipes
    ThaumcraftApi.getCraftingRecipes().add(clay3Rec);
    ThaumcraftApi.getCraftingRecipes().add(arcaneCoalS_Rec);

    // ThaumicStorage.archane_coal
    ShapedArcaneRecipe arcane_coal_rec =
        ThaumcraftApi.addArcaneCraftingRecipe(
            "",
            new ItemStack(TSItems.arcane_coal),
            new AspectList()
                .add(Aspect.FIRE, 40)
                .add(Aspect.ORDER, 20)
                .add(Aspect.ENTROPY, 20)
                .add(Aspect.EARTH, 10),
            new Object[] {
              "121",
              "343",
              "151",
              '1',
              new ItemStack(BlocksTC.plank, 1, 0),
              '2',
              new ItemStack(ItemsTC.shard, 1, 1),
              '3',
              new ItemStack(ItemsTC.nuggets, 1, 6),
              '4',
              new ItemStack(Blocks.coal_block),
              '5',
              new ItemStack(ItemsTC.alumentum, 1, 0)
            });

    // ThaumicStorage.archane_coal_block
    ShapedArcaneRecipe arcane_coal_block_rec =
        ThaumcraftApi.addArcaneCraftingRecipe(
            "",
            new ItemStack(TSItems.arcane_coal_block),
            new AspectList().add(Aspect.FIRE, 20).add(Aspect.ORDER, 20).add(Aspect.ENTROPY, 20),
            new Object[] {"111", "111", "111", '1', TSItems.arcane_coal});

    // ThaumicStorage.arcane_torch_dispenser
    ShapedArcaneRecipe arcane_torch_dispenser_rec =
        ThaumcraftApi.addArcaneCraftingRecipe(
            "",
            new ItemStack(TSItems.arcane_torch_dispenser),
            new AspectList()
                .add(Aspect.FIRE, 40)
                .add(Aspect.ORDER, 20)
                .add(Aspect.ENTROPY, 20)
                .add(Aspect.EARTH, 10),
            new Object[] {
              "121",
              "131",
              "141",
              '1',
              new ItemStack(ItemsTC.plate, 1, 0),
              '2',
              new ItemStack(Items.flint_and_steel, 1, 0),
              '3',
              new ItemStack(TSItems.arcane_coalS, 1, 0),
              '4',
              new ItemStack(ItemsTC.wandRods, 1, OreDictionary.WILDCARD_VALUE)
            });

    // Register Research Page
    // Arcane Coal
    new ResearchItem(
            "TS.r.arcane_coal",
            catName,
            new AspectList().add(Aspect.ORDER, 3).add(Aspect.FIRE, 3).add(Aspect.LIGHT, 3),
            3,
            0,
            1,
            new ItemStack(TSItems.arcane_coal, 1, 0))
        .setParents("TC.CRUCIBLE")
        .setPages(
            new ResearchPage("TS.p0.arcane_coal"),
            new ResearchPage("TS.p1.arcane_coal"),
            new ResearchPage(arcane_coal_rec),
            new ResearchPage("TS.p2.arcane_coal"),
            new ResearchPage("TS.p3.arcane_coal"))
        .registerResearchItem();

    // Register Research Page
    // Arcane Coal super-charged
    new ResearchItem(
            "TS.r.arcane_coalS",
            catName,
            new AspectList().add(Aspect.ORDER, 3).add(Aspect.FIRE, 3).add(Aspect.LIGHT, 3),
            4,
            -1,
            1,
            new ItemStack(TSItems.arcane_coalS, 1, 0))
        .setParents("TS.r.arcane_coal")
        .setSecondary()
        .setPages(new ResearchPage("TS.p0.arcane_coalS"), new ResearchPage(arcaneCoalS_Rec))
        .registerResearchItem();

    // Register Research Page
    // Arcane Coal Block
    new ResearchItem(
            "TS.r.arcane_coal_block",
            catName,
            new AspectList().add(Aspect.ORDER, 3),
            4,
            1,
            1,
            new ItemStack(TSItems.arcane_coal_block, 1, 0))
        .setParents("TS.r.arcane_coal")
        .setPages(
            new ResearchPage("TS.p0.arcane_coal_block"), new ResearchPage(arcane_coal_block_rec))
        .registerResearchItem();

    // Register Research Page
    // Arcane Torch Dispenser
    new ResearchItem(
            "TS.r.arcane_torch_dispenser",
            catName,
            new AspectList().add(Aspect.ORDER, 3).add(Aspect.FIRE, 3).add(Aspect.LIGHT, 3),
            5,
            -2,
            1,
            new ItemStack(TSItems.arcane_torch_dispenser, 1, 0))
        .setParents("TS.r.arcane_coalS")
        .setPages(
            new ResearchPage("TS.p0.arcane_torch_dispenser"),
            new ResearchPage(arcane_torch_dispenser_rec))
        .registerResearchItem();

    new ResearchItem(
            "TS.r.Entropy_clay",
            catName,
            new AspectList().add(Aspect.ENTROPY, 2),
            -1,
            -4,
            3,
            new ItemStack(Items.clay_ball, 1, 0))
        .setParents("TS.ALCHEMY")
        .setPages(
            new ResearchPage("TS.p0.Entropy_clay"), new ResearchPage(clay3Rec)
            //	new ResearchPage(clay3Rec2),
            //	new ResearchPage(clay3Rec3)
            )
        .registerResearchItem();
  }
Exemplo n.º 12
0
  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));
  }