Advertisement
Guest User

peddle

a guest
Oct 25th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. package com.nathan72419.SingularityUtil.WorldGeneration;
  2.  
  3. import java.util.Random;
  4.  
  5. import com.nathan72419.SingularityUtil.block.BlockRegistery;
  6.  
  7. import cpw.mods.fml.common.IWorldGenerator;
  8. import net.minecraft.world.World;
  9. import net.minecraft.world.chunk.IChunkProvider;
  10. import net.minecraft.world.gen.feature.WorldGenFlowers;
  11. import net.minecraft.world.gen.feature.WorldGenerator;
  12.  
  13. public class WorldGeneration implements IWorldGenerator {
  14.  
  15. @Override
  16. public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator,
  17. IChunkProvider chunkProvider) {
  18. switch (world.provider.dimensionId) {
  19. case 0:
  20. runGenerator(this.gen_peddle, world, random, chunkX, chunkZ);
  21. break;
  22. case -1:
  23.  
  24. break;
  25. case 1:
  26.  
  27. break;
  28.  
  29. }
  30.  
  31. }
  32. private WorldGenerator gen_peddle;
  33. public WorldGeneration() {
  34. this.gen_peddle = new WorldGenFlowers(BlockRegistery.littlestone);
  35. }
  36. private void runGenerator(WorldGenerator generator, World world, Random rand, int chunkX, int chunkZ){
  37.  
  38. for (int i = 0; i < 100; i ++) {
  39. int i1 = chunkX + rand.nextInt(16) + 8;
  40. int j1 = rand.nextInt(128) ;
  41. int k1 = chunkZ + rand.nextInt(16) + 8;
  42. generator.generate(world, rand, i1, j1, k1);
  43.  
  44. }
  45. }
  46.  
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement