How does one grab a chunk while it's being created and set it entirely to sky?

Discussion in 'Plugin Development' started by phondeux, Mar 5, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    phondeux

    I'm creating a plugin that should do that ... basically when a block is X distance from spawn it's changed to sky - all the way to and through bedrock. This is really expensive performance-wise and I was wondering; is there was a way to intercept the chunk creation process and just tell the world generator to make every block in the chunk sky?
     
  2. Offline

    Raphfrk

    They are planning world generation system which will allow that. They are also looking into stopping mass block updates from causing memory problems.
     
  3. Offline

    phondeux

    That's why I was asking; I've been following Timberjaws quest to create a dungeon generator and he and others have been discussing performance impacts of when to catch chunk generation and what's called at different stages.

    I created a stupidly simple plugin that when executed will go out X distance and start setting columns of blocks from bedrock to sky to just sky; the problem is that it takes forever and is really unpractical for any sized world. In addition it only works if the chunks are already generated. I tried to optimize it, but ... I suck. So I thought maybe someone would know when the chunks are generated and the appropriate time to insert values.
     
  4. Offline

    Raphfrk

    There is a method called loadChunk(), which will allow you to load a chunk.

    If you load an ungenerated chunk, then it will also generate it.

    Hmm, actually I wonder if you load an undecorated chunk if it would skip things like lighting.
     
Thread Status:
Not open for further replies.

Share This Page