Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. package init;
  2.  
  3. import com.nikea.colouredblocks.blocks.stone.BlackStoneBlock;
  4. import com.nikea.colouredblocks.blocks.Block.BlackBlock;
  5. import com.nikea.colouredblocks.blocks.Block.BlueBlock;
  6. import com.nikea.colouredblocks.blocks.Block.RedBlock;
  7. import com.nikea.colouredblocks.blocks.glowstone.BlueGlowStoneBlock;
  8. import com.nikea.colouredblocks.blocks.glowstone.RedGlowStoneBlock;
  9. import com.nikea.colouredblocks.blocks.glowstone.WhiteGlowStoneBlock;
  10. import com.nikea.colouredblocks.blocks.glowstone.YellowGlowStoneBlock;
  11. import com.nikea.colouredblocks.blocks.stone.BlueStoneBlock;
  12. import com.nikea.colouredblocks.blocks.stone.BrownStoneBlock;
  13. import com.nikea.colouredblocks.blocks.stone.LimeStoneBlock;
  14. import com.nikea.colouredblocks.blocks.stone.PinkStoneBlock;
  15. import com.nikea.colouredblocks.blocks.stone.RedStoneBlock;
  16. import com.nikea.colouredblocks.blocks.stone.WhiteStoneBlock;
  17. import com.nikea.colouredblocks.blocks.stone.YellowStoneBlock;
  18.  
  19. import net.minecraft.block.Block;
  20. import net.minecraft.block.state.IBlockState;
  21. import net.minecraft.client.Minecraft;
  22. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  23. import net.minecraft.item.Item;
  24. import net.minecraft.item.ItemBlock;
  25. import net.minecraftforge.fml.common.registry.GameRegistry;
  26.  
  27. public class ModBlocks {
  28.  
  29. public static Block bluestoneblock;
  30. public static Block yellowstoneblock;
  31. public static Block whitestoneblock;
  32. public static Block blackstoneblock;
  33. public static Block redstoneblock;
  34. public static Block limestoneblock;
  35. public static Block brownstoneblock;
  36. public static Block pinkstoneblock;
  37. public static Block blueglowstoneblock;
  38. public static Block redglowstoneblock;
  39. public static Block whiteglowstoneblock;
  40. public static Block yellowglowstoneblock;
  41. public static Block redblock;
  42. public static Block blueblock;
  43. public static Block blackblock;
  44.  
  45. public static void init() {
  46. bluestoneblock = new BlueStoneBlock();
  47. yellowstoneblock = new YellowStoneBlock();
  48. whitestoneblock = new WhiteStoneBlock();
  49. blackstoneblock = new BlackStoneBlock();
  50. redstoneblock = new RedStoneBlock();
  51. limestoneblock = new LimeStoneBlock();
  52. brownstoneblock = new BrownStoneBlock();
  53. pinkstoneblock = new PinkStoneBlock();
  54. blueglowstoneblock = new BlueGlowStoneBlock();
  55. redglowstoneblock = new RedGlowStoneBlock();
  56. whiteglowstoneblock = new WhiteGlowStoneBlock();
  57. yellowglowstoneblock = new YellowGlowStoneBlock();
  58. redblock = new RedBlock();
  59. blueblock = new BlueBlock();
  60. blackblock = new BlackBlock();
  61.  
  62. }
  63.  
  64. public static void register() {
  65. registerBlock(bluestoneblock);
  66. registerBlock(yellowstoneblock);
  67. registerBlock(whitestoneblock);
  68. registerBlock(blackstoneblock);
  69. registerBlock(redstoneblock);
  70. registerBlock(limestoneblock);
  71. registerBlock(brownstoneblock);
  72. registerBlock(pinkstoneblock);
  73. registerBlock(blueglowstoneblock);
  74. registerBlock(redglowstoneblock);
  75. registerBlock(whiteglowstoneblock);
  76. registerBlock(yellowglowstoneblock);
  77. registerBlock(redblock);
  78. registerBlock(blueblock);
  79. registerBlock(blackblock);
  80. }
  81.  
  82. private static void registerBlock(Block block) {
  83. GameRegistry.register(bluestoneblock);
  84. GameRegistry.register(yellowstoneblock);
  85. GameRegistry.register(whitestoneblock);
  86. GameRegistry.register(blackstoneblock);
  87. GameRegistry.register(redstoneblock);
  88. GameRegistry.register(limestoneblock);
  89. GameRegistry.register(brownstoneblock);
  90. GameRegistry.register(pinkstoneblock);
  91. GameRegistry.register(blueglowstoneblock);
  92. GameRegistry.register(redglowstoneblock);
  93. GameRegistry.register(whiteglowstoneblock);
  94. GameRegistry.register(yellowglowstoneblock);
  95. GameRegistry.register(redblock);
  96. GameRegistry.register(blueblock);
  97. GameRegistry.register(blackblock);
  98. ItemBlock item = new ItemBlock(block);
  99. item.setRegistryName(block.getRegistryName());
  100. GameRegistry.register(item);
  101. }
  102.  
  103. public static void registerRenders() {
  104. registerRender(bluestoneblock);
  105. registerRender(yellowstoneblock);
  106. registerRender(whitestoneblock);
  107. registerRender(blackstoneblock);
  108. registerRender(redstoneblock);
  109. registerRender(limestoneblock);
  110. registerRender(brownstoneblock);
  111. registerRender(pinkstoneblock);
  112. registerRender(blueglowstoneblock);
  113. registerRender(redglowstoneblock);
  114. registerRender(whiteglowstoneblock);
  115. registerRender(yellowglowstoneblock);
  116. registerRender(redblock);
  117. registerRender(blueblock);
  118. registerRender(blackblock);
  119.  
  120. }
  121.  
  122. private static void registerRender(Block block) {
  123. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
  124. }
  125.  
  126. //////////////////////////
  127. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement