Guest User

Untitled

a guest
Jun 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.21 KB | None | 0 0
  1. package net.minecraft.src;
  2. import java.util.Random;
  3. import net.minecraft.src.forge.*;
  4.  
  5. public class mod_Reagents extends BaseMod
  6. {
  7.  
  8. public String getVersion()
  9. {
  10. return "1.1.0";
  11. }
  12.  
  13. //declare blocks in class blockchemore.
  14. public static final Block chemistryOre = new BlockChemistryOre(230, 255).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("ChemistryOre");
  15. public static final Block nitrateOre = new BlockChemistryOre(230-1, 0).setHardness(3.0f).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("NitrateOre");
  16. public static final Block sulferOre = new BlockChemistryOre(230-2, 1).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("SulferOre");
  17. public static final Block copperOre = new BlockChemistryOre(230-3, 2).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("CopperOre");
  18. public static final Block tinOre = new BlockChemistryOre(230-4, 3).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("TinOre");
  19. public static final Block graphiteOre = new BlockChemistryOre(230-5, 4).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("GraphiteOre");
  20. public static final Block nickoliteOre = new BlockChemistryOre(230-6, 5).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("NickoliteOre");
  21.  
  22.  
  23.  
  24. //declare items.
  25. public static final Item chemistryItem = new ItemChemistryItem(4000).setIconCoord(15, 15).setItemName("ChemistryItem");
  26. public static final Item nitrate = new ItemChemistryItem(4000-1).setIconCoord(1, 0).setItemName("Nitrate");
  27. public static final Item sulfer = new ItemChemistryItem(4000-2).setIconCoord(0, 0).setItemName("Sulfer");
  28. public static final Item graphite = new ItemChemistryItem(4000-3).setIconCoord(2, 0).setItemName("Graphite");
  29. public static final Item nickolite = new ItemChemistryItem(4000-4).setIconCoord(3, 0).setItemName("Nickolite");
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. //set methods in side the Main class
  38. public mod_Reagents()
  39. {
  40.  
  41. RegisterBlocks();
  42. SetTextures();
  43. AddName();
  44. Recipes();
  45. }
  46.  
  47. public void RegisterBlocks()
  48. {
  49. ModLoader.RegisterBlock(chemistryOre);
  50. }
  51.  
  52. public void SetTextures()
  53. {
  54. MinecraftForgeClient.preloadTexture("/Reagents/ChemistryBlocks.png");
  55. MinecraftForgeClient.preloadTexture("/Reagents/ChemistryItems.png");
  56. }
  57.  
  58. public void AddName()
  59. {
  60. ModLoader.AddName(sulferOre, "Sulfer Ore");
  61. ModLoader.AddName(sulfer, "Sulfer");
  62. ModLoader.AddName(nitrateOre, "Nitrate Ore");
  63. ModLoader.AddName(nitrate, "Raw Nitrate");
  64. ModLoader.AddName(graphiteOre, "Graphite Ore");
  65. ModLoader.AddName(graphite, "Graphite");
  66. ModLoader.AddName(nickoliteOre, "Nickolite Ore");
  67. ModLoader.AddName(nickolite, "Nickolite");
  68. ModLoader.AddName(tinOre, "Tin Ore");
  69. ModLoader.AddName(copperOre, "Copper Ore");
  70. }
  71.  
  72. public void Recipes()
  73. {
  74.  
  75. }
  76.  
  77. public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
  78. {
  79. for(int i = 0; i < 45; i++)
  80. {
  81. int randPosX = chunkX + rand.nextInt(16);
  82. int randPosY = rand.nextInt(80);
  83. int randPosZ = chunkZ + rand.nextInt(16);
  84. (new WorldGenMinable(mod_Reagents.sulferOre.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
  85. }
  86. for(int i = 0; i < 60; i++)
  87. {
  88. int randPosX = chunkX + rand.nextInt(16);
  89. int randPosY = rand.nextInt(80);
  90. int randPosZ = chunkZ + rand.nextInt(16);
  91. (new WorldGenMinable(mod_Reagents.nitrateOre.blockID, 7)).generate(world, rand, randPosX, randPosY, randPosZ);
  92. }
  93. for(int i = 0; i < 30; i++)
  94. {
  95. int randPosX = chunkX + rand.nextInt(4);
  96. int randPosY = rand.nextInt(80);
  97. int randPosZ = chunkZ + rand.nextInt(16);
  98. (new WorldGenMinable(mod_Reagents.tinOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
  99. }
  100. for(int i = 0; i < 20; i++)
  101. {
  102. int randPosX = chunkX + rand.nextInt(16);
  103. int randPosY = rand.nextInt(80);
  104. int randPosZ = chunkZ + rand.nextInt(16);
  105. (new WorldGenMinable(mod_Reagents.copperOre.blockID, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
  106. }
  107. //for(int i = 0; i < 25; i++)
  108. //{
  109. // int randPosX = chunkX + rand.nextInt(16);
  110. // int randPosY = rand.nextInt(80);
  111. /// int randPosZ = chunkZ + rand.nextInt(16);
  112. //(new WorldGenMinable(mod_Reagents.graphiteOre.blockID, 2)).generate(world, rand, randPosX, randPosY, randPosZ);
  113. //}
  114. for(int i = 0; i < 27; i++)
  115. {
  116. int randPosX = chunkX + rand.nextInt(16);
  117. int randPosY = rand.nextInt(80);
  118. int randPosZ = chunkZ + rand.nextInt(16);
  119. (new WorldGenMinable(mod_Reagents.nickoliteOre.blockID, 3)).generate(world, rand, randPosX, randPosY, randPosZ);
  120. }
  121.  
  122. }
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. public void load()
  138. {
  139.  
  140. }
  141.  
  142.  
  143.  
  144. }
Add Comment
Please, Sign In to add comment