Guest User

Untitled

a guest
Nov 4th, 2016
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package thecraft.mod.common;
  2.  
  3. import cpw.mods.fml.common.Mod;
  4. import cpw.mods.fml.common.Mod.EventHandler;
  5. import cpw.mods.fml.common.Mod.Instance;
  6. import cpw.mods.fml.common.SidedProxy;
  7. import cpw.mods.fml.common.event.FMLInitializationEvent;
  8. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  9. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  10. import cpw.mods.fml.common.registry.GameRegistry;
  11. import net.minecraft.block.Block;
  12. import net.minecraft.block.material.Material;
  13. import net.minecraft.creativetab.CreativeTabs;
  14. import net.minecraft.init.Items;
  15. import net.minecraft.item.Item;
  16. import net.minecraft.item.Item.ToolMaterial;
  17. import net.minecraft.item.ItemArmor.ArmorMaterial;
  18. import net.minecraft.item.ItemStack;
  19. import net.minecraftforge.common.util.EnumHelper;
  20. import thecraft.mod.proxy.commonproxy;
  21.  
  22. @Mod(modid = exonor.MODID, name = "exonor" , version = "1.0.0")
  23.  
  24. public class exonor
  25. {
  26. public static CreativeTabs exonorCreativeTabs = new exonorCreativeTabs("exonor_creative_tabs");
  27. public static final String MODID = "exonor";
  28. @Instance(MODID)
  29. public static exonor instance;
  30.  
  31. @SidedProxy(clientSide = "thecraft.mod.proxy.clientproxy", serverSide = "thecraft.mod.proxy.commonproxy" )
  32. public static commonproxy proxy;
  33.  
  34. public static Item itemExonite, itemMaxencite, HelmetExonite, ChestPlateExonite, LegginsExonite, BootsExonite, exonitesworld, exnoitpichaxe, exoniteaxe, exonitchovel, exonithoe;
  35. public static Block oreExonite, oreMaxencite, exoniteblock;
  36.  
  37. public static ArmorMaterial exonitarmor = EnumHelper.addArmorMaterial("exonitarmor", 40, new int[]{5, 10, 6, 3}, 32);
  38. public static ToolMaterial exoniteTool = EnumHelper.addToolMaterial("exonitetool", 15, 2444, 13.0F, 6, 40);
  39.  
  40. @EventHandler
  41. public void preInit(FMLPreInitializationEvent test)
  42. {
  43. itemExonite = new ItemExonite().setUnlocalizedName("exonit").setTextureName(MODID + ":itemexonittex").setCreativeTab(CreativeTabs.tabMaterials);
  44. itemMaxencite = new ItemMaxencite().setUnlocalizedName("maxencite").setTextureName(MODID + ":itemmaxencitetex").setCreativeTab(CreativeTabs.tabMaterials);
  45. HelmetExonite = new ItemExonitArmor(exonitarmor, 0).setUnlocalizedName("helmetexonit").setTextureName(MODID + ":exonithelmettex");
  46. ChestPlateExonite = new ItemExonitArmor(exonitarmor, 1).setUnlocalizedName("chestplateexonite").setTextureName(MODID + ":exonitechestplatetex");
  47. LegginsExonite = new ItemExonitArmor(exonitarmor, 2).setUnlocalizedName("leggingsexonit").setTextureName(MODID + ":exoniteleggingstex");
  48. BootsExonite = new ItemExonitArmor(exonitarmor, 3).setUnlocalizedName("bootsexonit").setTextureName(MODID + ":exonitbootstex");
  49. exonitesworld = new ItemExoniteSworld(exoniteTool).setUnlocalizedName("sworldexonite").setTextureName(MODID + ":exonitesworldtex");
  50. exnoitpichaxe = new ItemExonitePichaxe(exoniteTool).setUnlocalizedName("exonitepickaxe").setTextureName(MODID + ":exonitepickaxetex");
  51. exoniteaxe = new ItemExoniteAxe(exoniteTool).setUnlocalizedName("exoniteaxe").setTextureName(MODID +":exoniteaxetex");
  52. exonitchovel = new ItemExoniteChovel(exoniteTool).setUnlocalizedName("exonitechovel").setTextureName(MODID + ":exonitechoveltex");
  53. exonithoe = new ItemExoniteHoe(exoniteTool).setUnlocalizedName("exonitehoe").setTextureName(MODID + ":exonitehoetex");
  54.  
  55. GameRegistry.registerItem(itemExonite, "exonit");
  56. GameRegistry.registerItem(itemMaxencite, "maxencite");
  57. GameRegistry.registerItem(HelmetExonite, "exonite_helmet");
  58. GameRegistry.registerItem(ChestPlateExonite, "exonite_chestplate");
  59. GameRegistry.registerItem(LegginsExonite, "exonite_leggings");
  60. GameRegistry.registerItem(BootsExonite, "exonite_boots");
  61. GameRegistry.registerItem(exonitesworld, "exonite_sworld");
  62. GameRegistry.registerItem(exnoitpichaxe, "exnoit_pichaxe");
  63. GameRegistry.registerItem(exoniteaxe, "exonite_axe");
  64. GameRegistry.registerItem(exonitchovel, "exonit_chovel");
  65. GameRegistry.registerItem(exonithoe, "exonit_hoe");
  66.  
  67. oreExonite = new OreExonite(Material.iron).setBlockName("oreexonite").setBlockTextureName(MODID + ":oreexonitetex").setCreativeTab(CreativeTabs.tabBlock).setHardness(15.0F).setResistance(4);
  68. oreMaxencite = new OreMaxencite(Material.iron).setBlockName("oremaxencite").setBlockTextureName(MODID + ":oremaxencitetex").setCreativeTab(CreativeTabs.tabBlock).setHardness(7.0F).setResistance(4);
  69. exoniteblock = new ExoniteBlock(Material.iron).setBlockName("exoniteblock").setBlockTextureName(MODID + ":exoniteblocktex").setCreativeTab(CreativeTabs.tabBlock).setHardness(15.0F).setResistance(4);
  70.  
  71. GameRegistry.registerBlock(oreExonite, "ore_exonite");
  72. GameRegistry.registerBlock(oreMaxencite, "ore_maxencite");
  73. GameRegistry.registerBlock(exoniteblock, "exonite_block");
  74.  
  75. GameRegistry.registerWorldGenerator(new ExonitGeneration(), 0);
  76.  
  77. }
  78.  
  79. @EventHandler
  80. public void init(FMLInitializationEvent test)
  81. {
  82. proxy.registerRender();
  83.  
  84. GameRegistry.addRecipe(new ItemStack(exoniteblock), new Object[]{"SSS", "SSS", "SSS", 'S', exonor.itemExonite});
  85. GameRegistry.addRecipe(new ItemStack(HelmetExonite), new Object[]{"SSS", "S S", " ", 'S', exonor.itemExonite});
  86. GameRegistry.addRecipe(new ItemStack(ChestPlateExonite), new Object[]{"S S", "SSS", "SSS", 'S', exonor.itemExonite});
  87. GameRegistry.addRecipe(new ItemStack(LegginsExonite), new Object[]{"SSS", "S S", "S S", 'S', exonor.itemExonite});
  88. GameRegistry.addRecipe(new ItemStack(BootsExonite), new Object[]{" ", "S S", "S S", 'S', exonor.itemExonite});
  89. GameRegistry.addRecipe(new ItemStack(exonitesworld), new Object[]{"S", "S", "A", 'S', exonor.itemExonite, 'A', Items.stick});
  90. GameRegistry.addRecipe(new ItemStack(exnoitpichaxe), new Object[]{"SSS", " A ", " A ", 'S', exonor.itemExonite, 'A', Items.stick});
  91. GameRegistry.addRecipe(new ItemStack(exoniteaxe), new Object[]{"SS ", "SA ", " A ", 'S', exonor.itemExonite, 'A', Items.stick});
  92. GameRegistry.addRecipe(new ItemStack(exonitchovel), new Object[]{"S", "A", "A", 'S', exonor.itemExonite, 'A', Items.stick});
  93. GameRegistry.addRecipe(new ItemStack(exonithoe), new Object[]{"SS", "A ", "A ", 'S', exonor.itemExonite, 'A', Items.stick});
  94. GameRegistry.addRecipe(new ItemStack(itemExonite, 9), new Object[]{" ", "S", " ", 'S', exonor.exoniteblock});
  95. GameRegistry.addRecipe(new ItemStack(itemExonite, 9), new Object[]{"S", " ", " ", 'S', exonor.exoniteblock});
  96. GameRegistry.addRecipe(new ItemStack(itemExonite, 9), new Object[]{" ", " ", "S", 'S', exonor.exoniteblock});
  97.  
  98. GameRegistry.addSmelting(exonor.oreExonite, new ItemStack(exonor.itemExonite), 1);
  99. }
  100.  
  101. @EventHandler
  102. public void postInit(FMLPostInitializationEvent test)
  103. {
  104. }
  105.  
  106. }
RAW Paste Data