To me it seems like when the
ChunkEvent.Load
event fires the blocks of the loading chunks aren't accessible yet. Is there another event I can use to access the blocks of a chunk directly when it's loaded or a completely different approach?
Also when calling
chunk.isLoaded()
in this particular event handler the chunk doesn't load correctly. Is this some kind of race condition between threads? This seems like I'm doing something completely wrong.
EDIT: I'm only doing this on the client side.
PS: Is there a way to have inline code in this forum?