New chunks are tree-less when onChunkLoad() is called

Discussion in 'Plugin Development' started by LRFLEW, Mar 10, 2011.

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

    LRFLEW

    I have been making a test plugin with onChunkLoad(), and I have run into a little bit if a snag. I started by trying to change a simple material found commonly on new chunks, grass. Other than some memory usage errors I quickly resolved, it worked well (other than the fact that I replaced the grass with TnT and the explosion was to big to take :p). When I figured that out, I tried to use a less-occuring element, logs. I quickly discovered that none of the trees were having TnT trunks. If I left that area to de-load the chunk and came back, the trunks changed. That only suggests that trees aren't spawned until after onChunkLoaded() is called. Does anybody else have this problem?

    On a side note, when will leaky be back up so I can post this?
     
  2. Offline

    Raphfrk

    That's right. Trees are considered "decoration", they get added after the chunk loaded event is triggered.

    Ofc, that only happens the first time they are loaded. Decoration only occurs once.
     
  3. Offline

    LRFLEW

    is there then some sort of onChunkDecorated() and/or a (ChunkLoadedEvent).isNew() ?
     
  4. Offline

    robin0van0der0v

    There is an "CHUNK_GENERATION" event I see. ;)
     
  5. Offline

    Raphfrk

    I don't think the CHUNK_GENERATION event is actually triggered. There is a world generation branch that will handle it.
     
Thread Status:
Not open for further replies.

Share This Page