Advertisement
Guest User

TutWorldGen

a guest
Mar 25th, 2013
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.19 KB | None | 0 0
  1. package OliveCraft;
  2.  
  3. import java.util.Random;
  4.  
  5. import net.minecraft.world.World;
  6. import net.minecraft.world.chunk.IChunkProvider;
  7. import cpw.mods.fml.common.IWorldGenerator;
  8.  
  9. public class TutWorldGen implements IWorldGenerator {
  10.    
  11.     @Override
  12.     public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
  13.         switch(world.provider.dimensionId){
  14.         case -1:
  15.             generateNether(world, random, chunkX * 16, chunkZ *16);
  16.            
  17.            
  18.         case 0:
  19.             generateSurface(world, random, chunkX * 16, chunkZ *16);
  20.            
  21.        
  22.         }
  23.        
  24.        
  25.     }
  26.    
  27.    
  28.     private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
  29. for(int i = 0; i < 16; i++){
  30.    
  31.     int Xcoord = BlockX + random.nextInt(16);
  32.     int Ycoord = random.nextInt(70);
  33.     int Zcoord = BlockZ + random.nextInt(16);
  34.    
  35. }
  36.  
  37. for(int i = 0; i < 20; i++){
  38.     int Xcoord1 = BlockX + random.nextInt(16);
  39.     int Ycoord1 = random.nextInt(90);
  40.     int Zcoord1 = BlockZ + random.nextInt(16);
  41.    
  42.     (new WorldGenTutTree(false, 6, 0, 0, false)).generate(world, random, Xcoord1, Ycoord1, Zcoord1);
  43. }
  44.     }
  45.  
  46.     private void generateNether(World world, Random random, int i, int j){
  47.        
  48.        
  49.     }
  50.    
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement