Guest User

Untitled

a guest
Jan 30th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. package com.Looke81.BioWarfare.init;
  2.  
  3. import com.Looke81.BioWarfare.BioWarfare;
  4. import com.Looke81.BioWarfare.blocks.AgarPlate;
  5. import com.Looke81.BioWarfare.blocks.BacteriaTest;
  6. import com.Looke81.BioWarfare.blocks.Jelly;
  7. import com.Looke81.BioWarfare.blocks.MachineCore;
  8. import com.Looke81.BioWarfare.blocks.MicrobeExtractor;
  9. import com.Looke81.BioWarfare.blocks.TestingBlock;
  10. import com.Looke81.BioWarfare.blocks.twobytwoDirt;
  11. import com.Looke81.BioWarfare.blocks.twobytwoDirtcompressed;
  12.  
  13. import net.minecraft.block.Block;
  14. import net.minecraft.block.material.Material;
  15. import net.minecraft.client.Minecraft;
  16. import net.minecraft.client.resources.model.ModelResourceLocation;
  17. import net.minecraft.item.Item;
  18. import net.minecraftforge.fml.common.registry.GameRegistry;
  19.  
  20. public class BioWarfareBlocks {
  21.  
  22. public static Block blockAgarPlate;
  23. public static Block blockMicrobeExtractorActive;
  24. public static Block blockMicrobeExtractorIdle;
  25. public static Block blockBacteriaTest;
  26. public static Block blockMachineCore;
  27. public static Block blockTestingBlock;
  28. public static Block blocktwobytwoDirt;
  29. public static Block blocktwobytwoDirtcompressed;
  30. public static Block blockJelly;
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. public static void init()
  38. {
  39. //Blocks
  40. blockMicrobeExtractorIdle = new MicrobeExtractor(false).setCreativeTab(BioWarfare.BioWarfareTab).setUnlocalizedName("MicrobeExtractorIdle");
  41. blockMicrobeExtractorActive = new MicrobeExtractor(true).setLightLevel(0.625F).setUnlocalizedName("MicrobeExtractorActive");
  42. blockBacteriaTest = new BacteriaTest(Material.cactus).setUnlocalizedName("BacteriaTest");
  43. blockMachineCore = new MachineCore(Material.rock).setUnlocalizedName("MachineCore");
  44. blockTestingBlock = new TestingBlock(Material.rock).setUnlocalizedName("TestingBlock");
  45. blocktwobytwoDirt = new twobytwoDirt(Material.rock).setUnlocalizedName("twobytwoDirt");
  46. blocktwobytwoDirtcompressed = new twobytwoDirtcompressed(Material.rock).setUnlocalizedName("twobytwoDirtcompressed");
  47. blockAgarPlate = new AgarPlate(Material.rock).setUnlocalizedName("AgarPlate");
  48. blockJelly = new Jelly(Material.rock).setUnlocalizedName("Jelly");
  49. }
  50.  
  51. public static void register()
  52. {
  53. GameRegistry.registerBlock(blockMicrobeExtractorIdle, "MicrobeExtractorIdle");
  54. GameRegistry.registerBlock(blockMicrobeExtractorActive, "MicrobeExtractorActive");
  55. GameRegistry.registerBlock(blockBacteriaTest, "BacteriaTest");
  56. GameRegistry.registerBlock(blockMachineCore, "MachineCore");
  57. GameRegistry.registerBlock(blockTestingBlock, "TestingBlock");
  58. GameRegistry.registerBlock(blocktwobytwoDirt, "twobytwoDirt,");
  59. GameRegistry.registerBlock(blocktwobytwoDirtcompressed, "twobytwoDirtcompressed,");
  60. GameRegistry.registerBlock(blockAgarPlate, "AgarPlate,");
  61. GameRegistry.registerBlock(blockJelly, "AgarJelly,");
  62. }
  63.  
  64. public static void registerRenders()
  65. {
  66. registerRender(blockAgarPlate);
  67. registerRender(blockMicrobeExtractorActive);
  68. registerRender(blockMicrobeExtractorIdle);
  69. registerRender(blockBacteriaTest);
  70. registerRender(blockMachineCore);
  71. registerRender(blockTestingBlock);
  72. registerRender(blocktwobytwoDirt);
  73. registerRender(blocktwobytwoDirtcompressed);
  74. registerRender(blockJelly);
  75.  
  76.  
  77.  
  78. }
  79.  
  80. public static void registerRender(Block block)
  81. {
  82. Item item = Item.getItemFromBlock(block);
  83. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(BioWarfare.modid + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  84. }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment