Advertisement
Guest User

Untitled

a guest
Aug 1st, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. package net.minecraft.src;
  2. import java.util.Random;
  3.  
  4. public class mod_TutorialOre extends BaseMod {
  5.  
  6. public static final Block oreTutorial = new BlockOre(101, 0).setHardness(5F).setResistance(10F).setBlockName("oreTutorial");
  7.  
  8. public mod_TutorialOre() {
  9. ModLoader.RegisterBlock(oreTutorial);
  10. oreTutorial.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Tutorial Ore/oretutorial.png");
  11. }
  12.  
  13. public void GenerateSurface(World world, Random rand, int randXCoord, int randZCoord) {
  14. for(int oreFrequency = 0; oreFrequency < 12; oreFrequency++) {
  15. int xCoord = randXCoord + rand.nextInt(16);
  16. int yCoord = rand.nextInt(128);
  17. int zCoord = randZCoord + rand.nextInt(16);
  18. new WorldGenMinable(Block.oreTutorial.blockID, 10).generate(world, rand, xCoord, yCoord, zCoord);
  19. }
  20. }
  21.  
  22. public String Version() {
  23. return "1.0 for MC Beta 1.7.3";
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement