bspkrs

TCInt

Jun 5th, 2013
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.13 KB | None | 0 0
  1. package rebelkeithy.mods.metallurgy.integration;
  2.  
  3. import net.minecraft.nbt.NBTTagCompound;
  4. import rebelkeithy.mods.metallurgy.api.IOreInfo;
  5. import rebelkeithy.mods.metallurgy.core.MetallurgyCore;
  6. import rebelkeithy.mods.metallurgy.core.metalsets.MetalSet;
  7. import rebelkeithy.mods.metallurgy.core.metalsets.OreInfo;
  8. import cpw.mods.fml.common.Loader;
  9. import cpw.mods.fml.common.event.FMLInterModComms;
  10.  
  11. public class TreeCapitatorIntegration
  12. {
  13.     public static void init()
  14.     {
  15.         if (Loader.isModLoaded("TreeCapitator"))
  16.         {
  17.             String axeList = "";
  18.            
  19.             for (MetalSet ms : MetallurgyCore.getMetalSetList())
  20.                 for (IOreInfo oi : ms.getOreList().values())
  21.                     if (oi.isEnabled())
  22.                         axeList += "; " + ((OreInfo) oi).axe.itemID;
  23.            
  24.             NBTTagCompound tpModCfg = new NBTTagCompound();
  25.             tpModCfg.setString("modID", "Metallurgy3Base");
  26.             tpModCfg.setString("axeIDList", axeList);
  27.            
  28.             FMLInterModComms.sendMessage("TreeCapitator", "ThirdPartyModConfig", tpModCfg);
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment