mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-28 15:35:01 +02:00
25 lines
612 B
Java
25 lines
612 B
Java
package net.minestom.server.instance;
|
|
|
|
import java.util.function.Consumer;
|
|
|
|
public interface IChunkLoader {
|
|
boolean loadChunk(Instance instance, int chunkX, int chunkZ, Consumer<Chunk> callback);
|
|
void saveChunk(Chunk chunk, Runnable callback);
|
|
|
|
/**
|
|
* Does this ChunkLoader allow for multithreaded saving of chunks?
|
|
* @return
|
|
*/
|
|
default boolean supportsParallelSaving() {
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Does this ChunkLoader allow for multithreaded loading of chunks?
|
|
* @return
|
|
*/
|
|
default boolean supportsParallelLoading() {
|
|
return false;
|
|
}
|
|
}
|