Guest User

Untitled

a guest
Jun 7th, 2016
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ed.AventS.mod;
  2.  
  3. import java.awt.Color;
  4.  
  5. import cpw.mods.fml.common.Mod;
  6. import cpw.mods.fml.common.Mod.EventHandler;
  7. import cpw.mods.fml.common.Mod.Instance;
  8. import cpw.mods.fml.common.SidedProxy;
  9. import cpw.mods.fml.common.event.FMLInitializationEvent;
  10. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  11. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  12. import cpw.mods.fml.common.registry.EntityRegistry;
  13. import cpw.mods.fml.common.registry.GameRegistry;
  14. import ed.AventS.mod.Block.BronzeOre;
  15. import ed.AventS.mod.Block.OreBlock;
  16. import ed.AventS.mod.CreativeTabs.AdvenTsTab;
  17. import ed.AventS.mod.Item.AvItem;
  18. import ed.AventS.mod.Item.RapidBow;
  19. import ed.AventS.mod.entity.EntityTest;
  20. import net.minecraft.block.Block;
  21. import net.minecraft.creativetab.CreativeTabs;
  22. import net.minecraft.item.Item;
  23. import net.minecraft.item.ItemStack;
  24.  
  25. @Mod(modid = "AventS", name = "AventS", version = "1.0.0")
  26. public class AventS {
  27. @Instance("AventS")
  28. public static AventS instance;
  29. public static final String MODID = "AventS";
  30. public static final String Version = "1.0.0";
  31. public static final String TEXTURE_NAME = MODID + "";
  32. @SidedProxy(clientSide = "ed.AventS.mod.ClientProxy", serverSide = "ed.AventS.mod.CommonProxy")
  33. public static CommonProxy proxy;
  34. public static CreativeTabs AdvenTsTab = new AdvenTsTab("AdvenTsTab");
  35. public static Item Bronze;
  36. public static Block BronzeOre;
  37. public static Item RapidBow;
  38. public static Block BronzeBlock;
  39.  
  40. @EventHandler
  41. public void preInit(FMLPreInitializationEvent event) {
  42.  
  43. /* Item */
  44. Bronze = new AvItem().setUnlocalizedName("Bronze").setTextureName(AventS.MODID + ":Bronze");
  45.  
  46. RapidBow = new RapidBow();
  47. /* Block */
  48. BronzeOre = new BronzeOre();
  49. BronzeBlock = new OreBlock().setBlockName("BronzeBlock").setBlockTextureName(AventS.MODID + ":BronzeBlock");
  50.  
  51. /* GameRegistry */
  52. GameRegistry.registerItem(RapidBow, "Rapid_Bow");
  53. GameRegistry.registerItem(Bronze, "Bronze");
  54. GameRegistry.registerBlock(BronzeOre, "Bronze_Ore");
  55. GameRegistry.registerBlock(BronzeBlock, "Bronze_Block");
  56. /* Cuisson */
  57. GameRegistry.addSmelting(BronzeOre, new ItemStack(Bronze), 1.0F);
  58. }
  59.  
  60. @EventHandler
  61. public void init(FMLInitializationEvent event) {
  62. proxy.registerRender();
  63. }
  64.  
  65. @EventHandler
  66. public void postInit(FMLPostInitializationEvent event) {
  67. EntityRegistry.registerGlobalEntityID(EntityTest.class, "EntityTest", EntityRegistry.findGlobalUniqueEntityId(),
  68. new Color(100, 100, 100).getRGB(), new Color(100, 100, 100).getRGB());
  69. EntityRegistry.registerModEntity(EntityTest.class, "EntityTest", 420, this.instance, 40, 2, true);
  70.  
  71. }
  72. }
RAW Paste Data