Guest User

Mon WorldGeneration

a guest
Aug 6th, 2017
37
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.lavapower.harmonia.common;
  2.  
  3. import java.util.Random;
  4.  
  5. import cpw.mods.fml.common.IWorldGenerator;
  6. import net.minecraft.init.Blocks;
  7. import net.minecraft.world.World;
  8. import net.minecraft.world.chunk.IChunkProvider;
  9.  
  10. public class WorldGeneration implements IWorldGenerator
  11. {
  12.  
  13. public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
  14. {
  15.  
  16. switch(world.provider.dimensionId)
  17. {
  18. case 0:
  19. generateSurface(world, random, chunkX * 16, chunkZ * 16);
  20. break;
  21. }
  22.  
  23. }
  24.  
  25. private void generateSurface(World world, Random random, int x, int z)
  26. {
  27. int x1 = x + random.nextInt(16);
  28. int y1 = random.nextInt(128);
  29. int z1 = z + random.nextInt(16);
  30. for (int i = 0; i < 100000; i++)
  31. {
  32. (new GenOrtie()).generate(world, random, x1, y1, z1);
  33. }
  34.  
  35. }
  36.  
  37. }
RAW Paste Data