Disallow chunk creation. - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Disallow chunk creation. (/thread-626.html) |
Disallow chunk creation. - ThuGie - 11-17-2012 Hey, Is it posible to disallow chunk creation using plugin ? Or perhaps a ini setting ? ini setting max size of world. Or by plugin getting chunkGen(int,int) return true to allow it return false to disallow it. This way we can easily stop the world from expanding. Or even create a strait line of chunks etc. RE: Disallow chunk creation. - FakeTruth - 11-17-2012 You can override the generator with a plugin to only create empty chunks. Empty chunks take nearly no disk space at all due to compression RE: Disallow chunk creation. - Taugeshtu - 11-17-2012 Quote:This way we can easily stop the world from expandingIf you're planning to bound players somehow - it's better done with teleportation and OnPlayerMove hook, I think... If so - go ahead, I would be thankful for such a plugin (heck, can't allow for all plugins I need to be written by me) RE: Disallow chunk creation. - ThuGie - 11-17-2012 Why not ? If its being done its better being done right.. So go ahead . And how do i overwrite chunks got a sample ? RE: Disallow chunk creation. - Taugeshtu - 11-17-2012 Quote:how do i overwrite chunksWell, that's where things are complicated We can't access chunks directly in lua (hmmm... Can't remember exactly why not, but it was some kind of multithreading-related stuff) But we can use cBlockArea or whatever it's called exactly! There's where math kicks in: you got to calculate your cBlockArea cuboid for given chunkX, chunkY coordinates. And I don't have any example yet, because I wasn't touching it still. Though I will be soon(-ish), but that's not guaranteed. But you don't need to overwrite whole chunk just to cancel its generation! Just return true (?) with OnChinkGenerating hook if you need in to be done with current chunk. RE: Disallow chunk creation. - ThuGie - 11-17-2012 Sorry i dont mean overwrite, i mean create empty chunks like faketruth said :$. Oh so i can just return true onchunkgeneration to cancel it ? Sweet thanks . |