Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Generator extends ChunkGenerator {
- @Override
- public byte[] generate(World arg0, Random arg1, int arg2, int arg3) {
- byte[] chunk = new byte[32768];
- for (int x = 0; x < 16; x++) {
- for (int z = 0; z < 16; z++) {
- for (int y = 0; y < 128; y++) {
- chunk[(x * 16 + z) * 128 + y] = (byte)(y < 64 ? Material.DIRT : Material.AIR).getId();
- }
- }
- }
- return chunk;
- }
- @Override
- public boolean canSpawn(World world, int x, int z) {
- return true;
- }
- @Override
- public Location getFixedSpawnLocation(World world, Random random) {
- return new Location(world, 0, 66, 0);
- }
- @Override
- public List<BlockPopulator> getDefaultPopulators(World world) {
- return new LinkedList<BlockPopulator>();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement