Guest User

Mod Base

a guest
Aug 2nd, 2014
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.14 KB | None | 0 0
  1. package naculis.mod;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.init.Blocks;
  5. import net.minecraft.init.Items;
  6. import net.minecraft.item.Item;
  7. import net.minecraft.item.ItemStack;
  8. import net.minecraft.item.crafting.CraftingManager;
  9. import net.minecraftforge.common.util.EnumHelper;
  10. import cpw.mods.fml.common.Mod;
  11. import cpw.mods.fml.common.Mod.EventHandler;
  12. import cpw.mods.fml.common.event.FMLInitializationEvent;
  13. import cpw.mods.fml.common.registry.GameRegistry;
  14.  
  15. @Mod(modid = NaculisModBase.MODID, version = NaculisModBase.VERSION)
  16. public class NaculisModBase
  17. {
  18.    
  19.    
  20.  
  21.     public static final String MODID = "Naculis Mod Base";
  22.     public static final String VERSION = "1.0";
  23.    
  24.     public static Block chickenBlawk;
  25.    
  26.     public static Item myItem;
  27.     //public static // myItem2;
  28.     //public static // myItem3;
  29.     //public static // myItem4;
  30.     //public static // myItem5;
  31.     Item blasterRifle = new ItemBlasterRifle();
  32.    
  33.     public static final Item.ToolMaterial PotatoStuffMat =
  34.                 EnumHelper.addToolMaterial("PotatoStuffMat", 3, 25, 55.0F, 9, 22);
  35.    
  36.     @EventHandler
  37.     public void init(FMLInitializationEvent event)
  38.     {
  39.        
  40.        
  41.         //chickenBlawk = new TestBlock();
  42.        
  43.         //bullet = new ItemBlasterBolt(PotatoStuffMat);
  44.        
  45.         //myItem2 = new TestItem2(PotatoStuffMat);
  46.  
  47.         blasterRifle = new ItemBlasterRifle();
  48.        
  49.        
  50.         //myItem3 = new TestItem3(PotatoStuffMat);
  51.        
  52.     //  myItem4 = new TestItem4(PotatoStuffMat);
  53.        
  54.         //myItem5 = new TestItem5(PotatoStuffMat);
  55.        
  56.        
  57.         //GameRegistry.registerItem(bullet, "Test Item");
  58.         //GameRegistry.registerItem(myItem2, "Test Item 2");
  59.         //GameRegistry.registerItem(myItem3, "Test Item 3");
  60.         //GameRegistry.registerItem(myItem4, "Test Item 4");
  61.         //GameRegistry.registerItem(myItem5, "Test Item 5");
  62.        
  63.         GameRegistry.registerItem(blasterRifle, "Blaster Rifle");
  64.        
  65.        
  66.        
  67.        
  68.         //GameRegistry.registerBlock(chickenBlawk, "Test Block");
  69.        
  70.         //3x3 Recipe makes obsidian
  71.         //NEW RECIPE
  72.                                            //block/item, quantity ,META data?
  73.         GameRegistry.addRecipe(new ItemStack(Blocks.command_block, 1), new Object[]
  74.                 {
  75.                  // Letter = Block, Space = Nothing
  76.                     "BBB",
  77.                     "BAB",
  78.                     "BBB",
  79.                     'A', Blocks.diamond_block, 'B', Items.redstone
  80.                 }
  81.         );
  82.        
  83.         //2x2 recipe makes diamond blocks into compasses
  84.         GameRegistry.addRecipe(new ItemStack(myItem, 10), new Object[]
  85.                 {  
  86.                  // Letter = Block, Space = Nothing
  87.                     " A ",
  88.                     " A ",
  89.                     " B ",
  90.                     'A', Items.potato, 'B', Items.stick
  91.                 }
  92.         );
  93.        
  94.         //2x2 recipe makes diamond blocks into compasses
  95.         GameRegistry.addRecipe(new ItemStack(chickenBlawk, 10), new Object[]
  96.                 {  
  97.                  // Letter = Block, Space = Nothing
  98.                     "AAA",
  99.                     "AAA",
  100.                     "AAA",
  101.                     'A', myItem
  102.                 }
  103.         );
  104.        
  105.         //Shapeless recipe                                Meta Data (9)
  106.         GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 1, 9), new Object[]
  107.                 {
  108.                     Items.redstone, Blocks.cobblestone
  109.                 }
  110.         );
  111.        
  112.         //Furnace recipe         /in                     /out                  /given xp
  113.         GameRegistry.addSmelting(Blocks.dirt, new ItemStack(Items.cooked_porkchop), 500F);
  114.        
  115.     }
  116. }
Advertisement
Add Comment
Please, Sign In to add comment