Advertisement
Guest User

Untitled

a guest
Jun 13th, 2011
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. class Generator extends ChunkGenerator {
  2.     @Override
  3.     public byte[] generate(World arg0, Random arg1, int arg2, int arg3) {
  4.         byte[] chunk = new byte[32768];
  5.         for (int x = 0; x < 16; x++) {
  6.             for (int z = 0; z < 16; z++) {
  7.                 for (int y = 0; y < 128; y++) {
  8.                     chunk[(x * 16 + z) * 128 + y] = (byte)(y < 64 ? Material.DIRT : Material.AIR).getId();
  9.                 }
  10.             }
  11.         }
  12.         return chunk;
  13.     }
  14.  
  15.     @Override
  16.     public boolean canSpawn(World world, int x, int z) {
  17.         return true;
  18.     }
  19.    
  20.     @Override
  21.     public Location getFixedSpawnLocation(World world, Random random) {
  22.         return new Location(world, 0, 66, 0);
  23.     }
  24.    
  25.     @Override
  26.     public List<BlockPopulator> getDefaultPopulators(World world) {
  27.         return new LinkedList<BlockPopulator>();
  28.     }  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement