| /* |
| * Copyright (c) 2010-2011 Graham Edgecombe. |
| * |
| * This file is part of Lightstone. |
| * |
| * Lightstone is free software: you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License as published by |
| * the Free Software Foundation, either version 3 of the License, or |
| * (at your option) any later version. |
| * |
| * Lightstone is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with Lightstone. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| |
| package net.lightstone.world; |
| |
| import net.lightstone.model.Chunk; |
| |
| public final class TestWorldGenerator implements WorldGenerator { |
| |
| @Override |
| public Chunk generate(int chunkX, int chunkZ) { |
| Chunk chunk = new Chunk(chunkX, chunkZ); |
| for (int x = 0; x < Chunk.WIDTH; x++) { |
| for (int z = 0; z < Chunk.HEIGHT; z++) { |
| for (int y = 0; y < Chunk.DEPTH; y++) { |
| int id = 0; |
| if (y == 60) |
| id = 2; |
| else if (y >= 55 && y < 60) |
| id = 3; |
| else if (y < 55) |
| id = 1; |
| |
| chunk.setType(x, z, y, id); |
| chunk.setMetaData(x, z, y, 0); |
| chunk.setBlockLight(x, z, y, 0); |
| chunk.setSkyLight(x, z, y, 15); |
| } |
| } |
| } |
| return chunk; |
| } |
| |
| } |