drackiseries

Adding Fuel Minecraft Code

May 6th, 2012
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. MOD_FILE CONTENTS:
  2.  
  3. package net.minecraft.src;
  4.  
  5. import java.util.Random;
  6.  
  7. public class mod_tutorial extends BaseMod
  8. {
  9.    
  10.     //Blocks
  11.    
  12.     //Items
  13.    
  14.     public static final Item Neutron = (new ItemNeutron(1009).setItemName("Neutron"));
  15.    
  16.  
  17.     public void load()
  18.     {
  19.        
  20.         Neutron.iconIndex = ModLoader.addOverride("/gui/items.png","/Items/neutroncatalyst.png");
  21.        
  22.         //Registering
  23.        
  24.         //Adding names
  25.  
  26.         ModLoader.addName(Neutron,"Neutron Catalyst");
  27.        
  28.         //Crafting Recipes
  29.        
  30.         //Smelting Recipes
  31.        
  32.         //Shapeless Recipes
  33.        
  34.         ModLoader.addShapelessRecipe(new ItemStack(mod_tutorial.Neutron, 1), new Object[]
  35.                 {
  36.                     Item.enderPearl, Item.diamond           //Crafting Line
  37.                 });
  38.        
  39.     }
  40.    
  41.     public int addFuel(int i, int j)
  42.     {
  43.         if (i == mod_tutorial.Neutron.shiftedIndex)
  44.         {
  45.             return 20000;
  46.         }
  47.        
  48.         return 0;
  49.     }
  50.    
  51.     public String getVersion()
  52.     {
  53.         return "1.2.5";
  54.     }
  55. }
  56.  
  57.  
  58. NEUTRON CATALYST ITEM FILE :
  59.  
  60. package net.minecraft.src;
  61.  
  62. public class ItemNeutron extends Item
  63. {
  64.     public ItemNeutron(int par1)
  65.     {
  66.         super(par1);
  67.     }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment