Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Overworld plugin;
- public OverworldGenerator(Overworld instance) {
- this.plugin = instance;
- }
- private int coordsToInt(int x, int y, int z) {
- return (x*16+z) * 128 + y;
- }
- public List<BlockPopulator> getDefaultPopulators(World world) {
- return new ArrayList<>();
- }
- public Location getFixedSpawnLocation(World world, Random random) {
- return new Location(world, 0.5, 27, 0.5);
- }
- public byte[] generate(World world, Random rand, int chunkX, int chunkZ) {
- byte[] blocks = new byte[32768];
- int x, y, z;
- for (x = 0; x < 16; ++x) {
- for (z = 0; z < 16; ++z) {
- blocks[this.coordsToInt(x, 0, z)] = (byte) Material.BEDROCK.getId();
- }
- }
- for (y=1; y < 26; ++y) {
- for (x = 0; x < 16; ++x) {
- for (z = 0; z < 16; ++z) {
- blocks[this.coordsToInt(x, y, z)] = (byte) Material.STAINED_CLAY.getId();
- }
- }
- }
- return blocks;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement