Comments for IChunkLoader specifying when to execute the callbacks

This commit is contained in:
themode 2020-09-27 20:48:12 +02:00
parent d43ba6a395
commit 09582cffc1

View File

@ -14,7 +14,8 @@ public interface IChunkLoader {
* @param instance the instance where the chunk belong
* @param chunkX the chunk X
* @param chunkZ the chunk Z
* @param callback the callback executed when the chunk is done loading
* @param callback the callback executed when the chunk is done loading,
* never called if something went wrong
* @return true if the chunk loaded successfully, false otherwise
*/
boolean loadChunk(Instance instance, int chunkX, int chunkZ, ChunkCallback callback);
@ -23,7 +24,8 @@ public interface IChunkLoader {
* Save a specific chunk with a callback for when it is done
*
* @param chunk the chunk to save
* @param callback the callback executed when the chunk is done saving
* @param callback the callback executed when the chunk is done saving,
* should be called even if the saving failed (you can throw an exception)
*/
void saveChunk(Chunk chunk, Runnable callback);