SHARE
TWEET

BlocksClass

a guest May 3rd, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.novatech.mod.init;
  2.  
  3. import com.novatech.mod.Reference;
  4. import com.novatech.mod.Blocks.BlockBasic;
  5. import com.novatech.mod.Blocks.BlockCropsMod;
  6.  
  7. import cpw.mods.fml.common.registry.GameRegistry;
  8. import net.minecraft.block.Block;
  9. import net.minecraft.block.material.Material;
  10. import net.minecraft.creativetab.CreativeTabs;
  11. import net.minecraft.item.ItemStack;
  12.  
  13. public class BlocksMod {
  14.    
  15.     public static Block nikraniumOre;
  16.     public static Block nikraniumBlock;
  17.     public static Block nikraniumCrop;
  18.    
  19.     public static void init() {
  20.  
  21.         nikraniumOre = new BlockBasic(Material.rock).setBlockName("nikraniumOre").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName(Reference.MOD_ID + ":nikraniumOre");
  22.         nikraniumBlock = new BlockBasic(Material.rock).setBlockName("nikraniumBlock").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName(Reference.MOD_ID + ":nikraniumBlock");
  23.         nikraniumCrop = new BlockCropsMod().setBlockName("nikraniumCrop").setBlockTextureName(Reference.MOD_ID + ":nikraniumCrop");
  24.        
  25.     }
  26.    
  27.     public static void register() {
  28.         GameRegistry.registerBlock(nikraniumOre, nikraniumOre.getUnlocalizedName().substring(5));
  29.         GameRegistry.registerBlock(nikraniumBlock, nikraniumBlock.getUnlocalizedName().substring(5));
  30.         GameRegistry.registerBlock(nikraniumCrop, nikraniumCrop.getUnlocalizedName().substring(5));
  31.        
  32.         GameRegistry.addRecipe(new ItemStack(BlocksMod.nikraniumBlock, 1), new Object[]{"###", "###", "###", '#', ItemMod.nikraniumIngot});
  33.        
  34.         GameRegistry.addSmelting(BlocksMod.nikraniumOre, new ItemStack(ItemMod.nikraniumIngot, 1), 1.0F);
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top