Hello - is there a way to empty a chunk without going block by block? I want a default world to generate buy with empty chunks over a certain coordinate - nobody seemed to know how to do that, so i'll empty the chunks manually (Unless anyone knows how to do it and read this thread) Thanks! bump EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I'm assuming you could modify the world generator to only fill the blocks with air if you are outside the specified set of coordinates. I just started looking at the world generation but looking at some of the tutorials on here would be a good start. This is the tutorial I was looking over: http://forums.bukkit.org/threads/basic-creating-custom-world-generators-new-api.79066/
http://forums.bukkit.org/threads/wgen-nullterrain-v0-4-2-generate-empty-worlds-1-2-5-r1-0.27362/ this is what I used to use. I'm not sure if it works on 1.3.1
I looked into both - about the first one, i checked it a fw days ago, the terrain generator is very problematic to work with, so i'll only use it if i find no other option. second - i dont want an empty world, just empty over a certain limit. Now, if i use my own generator (to empty only certain parts), it will override the default one so i'll have to code an exact replica of MC's generator, which im not able to do.
Feel free to modify this as you see fit: Code:java public int setBlocks(Material mat){ if(mat == null)return 0; int startX = Math.min(x1, x2); int endX = Math.max(x1, x2); int startY = Math.min(y1, y2); int endY = Math.max(y1, y2); int startZ = Math.min(z1, z2); int endZ = Math.max(z1, z2); undo.clear(); for (int x = startX; x <= endX; x++) { for (int y = startY; y <= endY; y++) { for (int z = startZ; z <= endZ; z++) { Location loc = new Location(world, x,y,z); Block block = loc.getBlock(); undo.put(loc, block.getType()); if(!ChestBless.isBless(block)){ block.setType(mat); } } } } return this.getSize(); }
Its a bad idea in general to generate a chunk and then empty it immediately. How hard would it be for you to move around your world to load the chunks, then change chunkgenerator to nullterrain? If it is too hard, I think there was some kind of plugin that had a generatechunks(radius) command.
thanks saber, but thats what i said i didnt want, going block by block. sternmin8or if i use this generator, it will override the current one. I could have done this one myself - its very simple, problem is that if i do that, i cant keep the default terrain as i want to.
Right, so generate as much terrain as you want with the minecraft terrain generator and THEN use the nullterrain generator to prevent any more from being generated. Or am I missing something?
Oh, yea, havent thought of that. But it won't work it my case, as the server is supposed to generate a new map like this each time, and not as a 1 time thing.