O3Bubbles09

Untitled

Feb 18th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.58 KB | None | 0 0
  1. package O3Bubbles09.Common;
  2.  
  3. import java.util.Random;
  4.  
  5. import O3Bubbles09.Common.O3Bubbles09;
  6.  
  7. import net.minecraft.world.World;
  8. import net.minecraft.world.chunk.IChunkProvider;
  9. import net.minecraft.world.gen.feature.WorldGenMinable;
  10. import cpw.mods.fml.common.IWorldGenerator;
  11.  
  12. public class WorldGenO3Bubbles09 implements IWorldGenerator {
  13.     O3Bubbles09 bubs;
  14.    
  15.     public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
  16.  
  17.         switch(world.provider.dimensionId) {
  18.  
  19.         case 1:
  20.             generateNether(world, random, chunkX *16, chunkZ *16);
  21.  
  22.         case 0:
  23.             generateSurface(world, random, chunkX *16, chunkZ *16);
  24.  
  25.         case -1:
  26.             generateEnd(world, random, chunkX *16, chunkZ *16);
  27.  
  28.         }
  29.  
  30.     }
  31.  
  32.     private void generateEnd(World world, Random random, int chunkX, int chunkZ) {
  33.  
  34.     }
  35.  
  36.     private void generateSurface(World world, Random random, int chunkX, int chunkZ) {
  37.  
  38.         for(int i = 0; i < 10; i++) {
  39.             int xCoord = chunkX + random.nextInt(16);
  40.             int yCoord = random.nextInt(64);
  41.             int zCoord = chunkZ + random.nextInt(16);
  42.  
  43.             if(bubs.copperOreSpawn == true) {
  44.                 (new WorldGenMinable(bubs.copperOre.blockID, 6)).generate(world, random, xCoord, yCoord, zCoord);
  45.             }
  46.         }
  47.        
  48.         for(int i = 0; i < 6; i++) {
  49.             int xC = chunkX + random.nextInt(16);
  50.             int yC = random.nextInt(16);
  51.             int zC = chunkZ + random.nextInt(16);
  52.        
  53.             if(bubs.kunziteOreSpawn == true) {
  54.                 (new WorldGenMinable(bubs.kunziteOre.blockID, 4)).generate(world, random, xC, yC, zC);
  55.             }
  56.         }
  57.     }
  58.  
  59.     private void generateNether(World world, Random random, int chunkX, int chunkZ) {
  60.  
  61.     }
  62.  
  63. }
Advertisement
Add Comment
Please, Sign In to add comment