Presence of Chunks in Sponge

It was stated that the official Minecraft plugin API will not provide direct access to chunks, because Chunks are just internal data objects:

[Mojang] Grum (Erik Broes) added a comment - 04/Oct/12 8:08 PM - edited

You shall never hear of chunks again with the coming api. However there should be a way to keep areas loaded for some mechanics. Abuse will be up for control by the person using this feature as there is no way of telling what is considered good or bad behaviour.

Things like ticking of blocks should be handled a bit more elegantly; ideally, blocks should register when they want to ‘tick’ rather than tick randomly. The world should store these queued times and possibly fast-forward through them when they load again.


I think the Sponge API should also follow this convention to be compatible with the official API.
A special case are Bukkit’s 16x16 byte arrays for world generators, used for performance reasons. If we don’t want to use chunks at all, we also need a replacement for that…

I don’t think Sponge is going to be “compatible” with the official API.
But replacing access to chunks by a more intuitive API makes sense to me.
I think World Generators have to be an exception though, as the performance drop with a non-array-based API would be fatal. In Java calling a method on an object takes sooo much longer than writing a value to an array.

Maybe not compatible, but they want to build it on top of the mojang API I think.

Hm, you’re right. I wonder how they deal with it if it’s overly restrictive…

That was a comment from 2 years ago…and you want us to remove Chunk objects based on that?

Don’t get me wrong, Chunks are a bad API concept…namely cause its an implementation concept used for performance reasons. There are not many reasons to have a Chunk object but those exist. Its better to base it upon other factors vs a “random comment from a Mojang employee”.