Guest User

Untitled

a guest
Jan 26th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. import java.util.Random;
  2.  
  3. import net.minecraft.init.Blocks;
  4. import net.minecraft.world.World;
  5. import net.minecraft.world.chunk.IChunkProvider;
  6. import net.minecraft.world.gen.feature.WorldGenMinable;
  7. import cpw.mods.fml.common.IWorldGenerator;
  8.  
  9. import com.DerpTesting.DerpTesting;
  10. import com.DerpTesting.blocks.BlockLantern;
  11.  
  12. public class WorldGenCrystal implements IWorldGenerator{
  13.  
  14. public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){
  15. switch(world.provider.dimensionId){
  16. case -1:
  17. generateNether(world, rand, chunkX * 16, chunkZ * 16);
  18. case 0:
  19. generateSurface(world, rand, chunkX * 16, chunkZ * 16);
  20.  
  21. }
  22.  
  23. }
  24.  
  25. private void generateSurface(World world, Random rand, int chunkX, int chunkZ){
  26. for (int i = 0; i < 100; i++){
  27. int randPosX = chunkX + rand.nextInt(16);
  28. int randPosY = rand.nextInt(65);
  29. int randPosZ = chunkZ + rand.nextInt(16);
  30.  
  31. (new WorldGenMinable(DerpTesting.Aqua_SmallCrystal, 14)).generate(world, rand, randPosX, randPosY, randPosZ);
  32.  
  33. }
  34. }
  35.  
  36. private void generateNether(World world, Random rand, int i, int j) {
  37.  
  38.  
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment