Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
I want to make server don't generate chunks, only load existing. Is there any way of doing that?
I saw there is a OnChunkGenerating hook but wiki says that is you return true no other plugin calls hook, but it dont says chunk is not loaded.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Chunk is generated only when it cannot be loaded from any of the supported storage schemas. So when you get an OnChunkGenerating hook, you already know that the chunk cannot be loaded. Now, no matter what that hook returns, the server will still generate the chunk; but you can manipulate the ChunkDesc parameter to force an almost-empty chunk generation - just fill the chunk with all air and set it as not using the default generators. Of course, this is not exactly cancelling the generation, but the MCServer architecture dictates that "any chunk must be available on request, either loaded, or generated". We do not support holes in the chunkmap - and neither does the client.
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
A chunk filled with air will use less ram and disk space?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
It will use the same amount of ram as any other chunk (for now, until we have chunk-sparsing), but it will use very little diskspace - about 4 KiB
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
09-13-2013, 11:50 PM
(This post was last modified: 09-13-2013, 11:50 PM by tonibm19.)
Ok, I want to use a pregenerated map and I don't want to use too much diskspace and also save ram because players wont be able to load more chunks , they cant walk on air.
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
11-24-2013, 05:55 AM
(This post was last modified: 11-24-2013, 05:56 AM by tonibm19.)
Client/server supports holes, just try nonewchunks bukkit plugin.