wasliebob

.m

Oct 18th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. package mods.ForestryExtras.helpers;
  2.  
  3. import mods.ForestryExtras.main.Config;
  4. import net.minecraftforge.oredict.OreDictionary;
  5. import thaumcraft.api.ThaumcraftApi;
  6. import thaumcraft.api.aspects.Aspect;
  7. import thaumcraft.api.aspects.AspectList;
  8. import cpw.mods.fml.common.Loader;
  9.  
  10. public class Thaumcraft4Helper {
  11.  
  12. public static boolean isThaumcraft4Loaded()
  13. {
  14. return isThaumcraft4Loaded;
  15. }
  16.  
  17. public static void load()
  18. {
  19. if(Loader.isModLoaded("Thaumcraft"))
  20. {
  21. isThaumcraft4Loaded = true;
  22. addAspects();
  23. System.out.print(isThaumcraft4Loaded + " ");
  24. System.out.print(modLoaded + " " + "Loaded, ");
  25. }
  26. else
  27. {
  28. System.out.print(isThaumcraft4Loaded + " ");
  29. }
  30. }
  31.  
  32. public static void addAspects()
  33. {
  34. ThaumcraftApi.registerObjectTag(Config.draconicIngotId, -1, (new AspectList()).add(Aspect.ELDRITCH, 2).add(Aspect.FIRE, 3).add(Aspect.MAGIC, 5));
  35. ThaumcraftApi.registerObjectTag(Config.reinforcedIngotId, -1, (new AspectList()).add(Aspect.CRYSTAL, 3).add(Aspect.METAL, 3));
  36. ThaumcraftApi.registerObjectTag(Config.draconicStickId, -1, (new AspectList()).add(Aspect.ELDRITCH, 2*2).add(Aspect.FIRE, 3*2).add(Aspect.MAGIC, 5*2));
  37. ThaumcraftApi.registerObjectTag(Config.reinforcedStickId, -1, (new AspectList()).add(Aspect.CRYSTAL, 3*2).add(Aspect.METAL, 3*2));
  38.  
  39. ThaumcraftApi.registerObjectTag(Config.draconicBlockId, -1, (new AspectList()).add(Aspect.ELDRITCH, 2*9).add(Aspect.FIRE, 3*9).add(Aspect.MAGIC, 5*9));
  40. ThaumcraftApi.registerObjectTag(Config.reinforcedBlockId, -1, (new AspectList()).add(Aspect.CRYSTAL, 3*9).add(Aspect.METAL, 3*9));
  41.  
  42. ThaumcraftApi.registerObjectTag(Config.ironStickId, -1, (new AspectList()).add(Aspect.METAL, 2));
  43. ThaumcraftApi.registerObjectTag(Config.goldStickId, -1, (new AspectList()).add(Aspect.GREED, 2));
  44. ThaumcraftApi.registerObjectTag(Config.diamondStickId, -1, (new AspectList()).add(Aspect.CRYSTAL, 2));
  45. ThaumcraftApi.registerObjectTag(Config.emeraldStickId, -1, (new AspectList()).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 2));
  46.  
  47. if(OreDictionary.getOres("ingotCopper").size() > 0)
  48. ThaumcraftApi.registerObjectTag(Config.copperStickId, -1, (new AspectList()).add(Aspect.METAL, 4));
  49. if(OreDictionary.getOres("ingotTin").size() > 0)
  50. ThaumcraftApi.registerObjectTag(Config.tinStickId, -1, (new AspectList()).add(Aspect.METAL, 4));
  51. if(OreDictionary.getOres("ingotBronze").size() > 0)
  52. ThaumcraftApi.registerObjectTag(Config.bronzeStickId, -1, (new AspectList()).add(Aspect.METAL, 8));
  53. if(OreDictionary.getOres("ingotLead").size() > 0)
  54. ThaumcraftApi.registerObjectTag(Config.leadStickId, -1, (new AspectList()).add(Aspect.METAL, 4));
  55. if(OreDictionary.getOres("ingotSilver").size() > 0)
  56. ThaumcraftApi.registerObjectTag(Config.silverStickId, -1, (new AspectList()).add(Aspect.METAL, 4));
  57. if(OreDictionary.getOres("ingotSteel").size() > 0)
  58. ThaumcraftApi.registerObjectTag(Config.steelStickId, -1, (new AspectList()).add(Aspect.METAL, 3));
  59.  
  60.  
  61. if(OreDictionary.getOres("ingotAluminium").size() > 0)
  62. ThaumcraftApi.registerObjectTag(Config.aluminiumStickId, -1, (new AspectList()).add(Aspect.METAL, 4));
  63. if(OreDictionary.getOres("ingotAlumite").size() > 0)
  64. ThaumcraftApi.registerObjectTag(Config.alumiteStickId, -1, (new AspectList()).add(Aspect.METAL, 6));
  65. if(OreDictionary.getOres("ingotArdite").size() > 0)
  66. ThaumcraftApi.registerObjectTag(Config.arditeStickId, -1, (new AspectList()).add(Aspect.METAL, 4).add(Aspect.FIRE, 2));
  67. if(OreDictionary.getOres("ingotCobalt").size() > 0)
  68. ThaumcraftApi.registerObjectTag(Config.cobaltStickId, -1, (new AspectList()).add(Aspect.METAL, 4).add(Aspect.FIRE, 2));
  69. if(OreDictionary.getOres("ingotManyullyn").size() > 0)
  70. ThaumcraftApi.registerObjectTag(Config.manyullynStickId, -1, (new AspectList()).add(Aspect.METAL, 8).add(Aspect.FIRE, 4));
  71. }
  72.  
  73. private static String modLoaded = "Thaumcraft 4";
  74. private static boolean isThaumcraft4Loaded = false;
  75. }
Advertisement
Add Comment
Please, Sign In to add comment