Exporting cChunk
#1
Is there a reason why cChunk isn't exported to the Lua API? Using that plugins could change a chunk directly instead of going through a world object first (kinda like cBlockArea, but you wouldn't have to read it from the world first).
There could be a cWorld:DoWithChunk, and the cChunkStay:OnChunkAvailable callback could have a cChunk object as a 3th parameter.

Thoughts?
Reply
Thanks given by:
#2
I would support the export of DoWithChunk, and the new method DoWithChunkAt (takes block coords, rather than chunk coords). It would enable us to remove or at least depreciate a few functions that are only in cWorld for the lua API.
Reply
Thanks given by:
#3
We don't want plugins to ever get hold of a cChunk instance, who knows what kind of mayhem they would cause. Despite all the warnings there are still plugins storing entity instances between calls, and with chunks it would be much worse.
You don't actually need to read cBlockArea, you can compose it and directly write it.
What's the big issue about using cBlockArea anyway? It works nicely, it even has more operations than cChunk.
Reply
Thanks given by:
#4
I think we should assume that the plugins are written correctly without them storing a cChunk object.

I just think some plugins could benefit if they could acces a cChunk object and change stuff from there instead of going through the cWorld first.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)