Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.12 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import java.util.Random;
  4.  
  5. public class mod_Pamflowers extends BaseMod
  6. {
  7.  
  8. public static final Block blackPlant = new BlockBlackPlant(152, 0).setBlockName("blackPlant");
  9. public static final Block bluePlant = new BlockBluePlant(153, 0).setBlockName("bluePlant");
  10. public static final Block brownPlant = new BlockBrownPlant(154, 0).setBlockName("brownPlant");
  11. public static final Block cyanPlant = new BlockCyanPlant(155, 0).setBlockName("cyanPlant");
  12. public static final Block greenPlant = new BlockGreenPlant(156, 0).setBlockName("greenPlant");
  13. public static final Block greyPlant = new BlockGreyPlant(157, 0).setBlockName("greyPlant");
  14. public static final Block lightbluePlant = new BlockLightBluePlant(158, 0).setBlockName("lightbluePlant");
  15. public static final Block lightgreyPlant = new BlockLightGreyPlant(159, 0).setBlockName("lightgreyPlant");
  16. public static final Block limePlant = new BlockLimePlant(160, 0).setBlockName("limePlant");
  17. public static final Block magentaPlant = new BlockMagentaPlant(161, 0).setBlockName("magentaPlant");
  18. public static final Block orangePlant = new BlockOrangePlant(162, 0).setBlockName("orangePlant");
  19. public static final Block pinkPlant = new BlockPinkPlant(163, 0).setBlockName("pinkPlant");
  20. public static final Block purplePlant = new BlockPurplePlant(164, 0).setBlockName("purplePlant");
  21. public static final Block whitePlant = new BlockWhitePlant(165, 0).setBlockName("whitePlant");
  22.  
  23.  
  24. public mod_Pamflowers()
  25. {
  26.  
  27. ModLoader.RegisterBlock(blackPlant);
  28. ModLoader.RegisterBlock(bluePlant);
  29. ModLoader.RegisterBlock(brownPlant);
  30. ModLoader.RegisterBlock(cyanPlant);
  31. ModLoader.RegisterBlock(greenPlant);
  32. ModLoader.RegisterBlock(greyPlant);
  33. ModLoader.RegisterBlock(lightbluePlant);
  34. ModLoader.RegisterBlock(lightgreyPlant);
  35. ModLoader.RegisterBlock(limePlant);
  36. ModLoader.RegisterBlock(magentaPlant);
  37. ModLoader.RegisterBlock(orangePlant);
  38. ModLoader.RegisterBlock(pinkPlant);
  39. ModLoader.RegisterBlock(purplePlant);
  40. ModLoader.RegisterBlock(whitePlant);
  41.  
  42. blackPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/blackplant.png");
  43. bluePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/blueplant.png");
  44. brownPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/brownplant.png");
  45. cyanPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/cyanplant.png");
  46. greenPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/greenplant.png");
  47. greyPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/greyplant.png");
  48. lightbluePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/lightblueplant.png");
  49. lightgreyPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/lightgreyplant.png");
  50. limePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/limeplant.png");
  51. magentaPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/magentaplant.png");
  52. orangePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/orangeplant.png");
  53. pinkPlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/pinkplant.png");
  54. purplePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/purpleplant.png");
  55. whitePlant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/pamflowers/whiteplant.png");
  56.  
  57. ModLoader.AddName(blackPlant, "Black Flower");
  58. ModLoader.AddName(bluePlant, "Blue Flower");
  59. ModLoader.AddName(brownPlant, "Dying Bush");
  60. ModLoader.AddName(cyanPlant, "Cyan Flower");
  61. ModLoader.AddName(greenPlant, "Green Bush");
  62. ModLoader.AddName(greyPlant, "Grey Flower");
  63. ModLoader.AddName(lightbluePlant, "Light Blue Flower");
  64. ModLoader.AddName(lightgreyPlant, "Light Grey Flower");
  65. ModLoader.AddName(limePlant, "Bright Green Bush");
  66. ModLoader.AddName(magentaPlant, "Magenta Flower");
  67. ModLoader.AddName(orangePlant, "Orange Flower");
  68. ModLoader.AddName(pinkPlant, "Pink Flower");
  69. ModLoader.AddName(purplePlant, "Purple Flower");
  70. ModLoader.AddName(whitePlant, "White Flower");
  71.  
  72. // Flowers + Wool = Dyed Wool Recipes
  73. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 15), new Object[]
  74. {
  75. new ItemStack(mod_Pamflowers.blackPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  76. });
  77. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 11), new Object[]
  78. {
  79. new ItemStack(mod_Pamflowers.bluePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  80. });
  81. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 12), new Object[]
  82. {
  83. new ItemStack(mod_Pamflowers.brownPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  84. });
  85. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 9), new Object[]
  86. {
  87. new ItemStack(mod_Pamflowers.cyanPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  88. });
  89. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 13), new Object[]
  90. {
  91. new ItemStack(mod_Pamflowers.greenPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  92. });
  93. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 7), new Object[]
  94. {
  95. new ItemStack(mod_Pamflowers.greyPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  96. });
  97. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 3), new Object[]
  98. {
  99. new ItemStack(mod_Pamflowers.lightbluePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  100. });
  101. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 8), new Object[]
  102. {
  103. new ItemStack(mod_Pamflowers.lightgreyPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  104. });
  105. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 5), new Object[]
  106. {
  107. new ItemStack(mod_Pamflowers.limePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  108. });
  109. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 2), new Object[]
  110. {
  111. new ItemStack(mod_Pamflowers.magentaPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  112. });
  113. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 1), new Object[]
  114. {
  115. new ItemStack(mod_Pamflowers.orangePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  116. });
  117. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 6), new Object[]
  118. {
  119. new ItemStack(mod_Pamflowers.pinkPlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  120. });
  121. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 10), new Object[]
  122. {
  123. new ItemStack(mod_Pamflowers.purplePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  124. });
  125. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 0), new Object[]
  126. {
  127. new ItemStack(mod_Pamflowers.whitePlant, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  128. });
  129. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 14), new Object[]
  130. {
  131. new ItemStack(Block.plantRed, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  132. });
  133. ModLoader.AddShapelessRecipe(new ItemStack(Block.cloth, 1, 4), new Object[]
  134. {
  135. new ItemStack(Block.plantYellow, 1), new ItemStack(Item.itemsList[Block.cloth.blockID], 1, 0)
  136. });
  137.  
  138. }
  139.  
  140. public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
  141. {
  142. for(int i = 0; i < 5; i++)
  143. {
  144. int randPosX = chunkX + rand.nextInt(16) + 8;
  145. int randPosY = rand.nextInt(128);
  146. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  147. (new WorldGenBlackPlant(mod_Pamflowers.blackPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  148. }
  149. for(int i = 0; i < 5; i++)
  150. {
  151. int randPosX = chunkX + rand.nextInt(16) + 8;
  152. int randPosY = rand.nextInt(128);
  153. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  154. (new WorldGenBluePlant(mod_Pamflowers.bluePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  155. }
  156. for(int i = 0; i < 5; i++)
  157. {
  158. int randPosX = chunkX + rand.nextInt(16) + 8;
  159. int randPosY = rand.nextInt(128);
  160. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  161. (new WorldGenBrownPlant(mod_Pamflowers.brownPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  162. }
  163. for(int i = 0; i < 5; i++)
  164. {
  165. int randPosX = chunkX + rand.nextInt(16) + 8;
  166. int randPosY = rand.nextInt(128);
  167. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  168. (new WorldGenCyanPlant(mod_Pamflowers.cyanPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  169. }
  170. for(int i = 0; i < 5; i++)
  171. {
  172. int randPosX = chunkX + rand.nextInt(16) + 8;
  173. int randPosY = rand.nextInt(128);
  174. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  175. (new WorldGenGreenPlant(mod_Pamflowers.greenPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  176. }
  177. for(int i = 0; i < 5; i++)
  178. {
  179. int randPosX = chunkX + rand.nextInt(16) + 8;
  180. int randPosY = rand.nextInt(128);
  181. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  182. (new WorldGenGreyPlant(mod_Pamflowers.greyPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  183. }
  184. for(int i = 0; i < 5; i++)
  185. {
  186. int randPosX = chunkX + rand.nextInt(16) + 8;
  187. int randPosY = rand.nextInt(128);
  188. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  189. (new WorldGenLightBluePlant(mod_Pamflowers.lightbluePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  190. }
  191. for(int i = 0; i < 5; i++)
  192. {
  193. int randPosX = chunkX + rand.nextInt(16) + 8;
  194. int randPosY = rand.nextInt(128);
  195. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  196. (new WorldGenLightGreyPlant(mod_Pamflowers.lightgreyPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  197. }
  198. for(int i = 0; i < 5; i++)
  199. {
  200. int randPosX = chunkX + rand.nextInt(16) + 8;
  201. int randPosY = rand.nextInt(128);
  202. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  203. (new WorldGenLimePlant(mod_Pamflowers.limePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  204. }
  205. for(int i = 0; i < 5; i++)
  206. {
  207. int randPosX = chunkX + rand.nextInt(16) + 8;
  208. int randPosY = rand.nextInt(128);
  209. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  210. (new WorldGenMagentaPlant(mod_Pamflowers.magentaPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  211. }
  212. for(int i = 0; i < 5; i++)
  213. {
  214. int randPosX = chunkX + rand.nextInt(16) + 8;
  215. int randPosY = rand.nextInt(128);
  216. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  217. (new WorldGenOrangePlant(mod_Pamflowers.orangePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  218. }
  219. for(int i = 0; i < 5; i++)
  220. {
  221. int randPosX = chunkX + rand.nextInt(16) + 8;
  222. int randPosY = rand.nextInt(128);
  223. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  224. (new WorldGenPinkPlant(mod_Pamflowers.pinkPlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  225. }
  226. for(int i = 0; i < 5; i++)
  227. {
  228. int randPosX = chunkX + rand.nextInt(16) + 8;
  229. int randPosY = rand.nextInt(128);
  230. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  231. (new WorldGenPurplePlant(mod_Pamflowers.purplePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  232. }
  233. for(int i = 0; i < 5; i++)
  234. {
  235. int randPosX = chunkX + rand.nextInt(16) + 8;
  236. int randPosY = rand.nextInt(128);
  237. int randPosZ = chunkZ + rand.nextInt(16) + 8;
  238. (new WorldGenWhitePlant(mod_Pamflowers.whitePlant.blockID)).generate(world, rand, randPosX, randPosY, randPosZ);
  239. }
  240.  
  241. }
  242.  
  243. public void RenderInvBlock(RenderBlocks renderblocks, Block block, int i, int j)
  244. {
  245. }
  246.  
  247. public String Version()
  248. {
  249. return "1.7.2";
  250. }
  251.  
  252. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement