Interface IChunkLoader
- All Known Implementing Classes:
ChunkLoaderSpigot
public interface IChunkLoader
Tool that can be used to load chunks or check if they are already loaded.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents the different modes of checking chunks.static enumThe result of attempting to load one or more chunks. -
Method Summary
Modifier and TypeMethodDescriptioncheckChunk(IWorld world, IVector3D position, IChunkLoader.ChunkLoadMode chunkLoadMode) Checks if the chunk a position exists in is loaded.checkChunks(IWorld world, Cuboid cuboid, IChunkLoader.ChunkLoadMode chunkLoadMode) Checks if all chunks intersecting with a cuboid are loaded.
-
Method Details
-
checkChunks
IChunkLoader.ChunkLoadResult checkChunks(IWorld world, Cuboid cuboid, IChunkLoader.ChunkLoadMode chunkLoadMode) Checks if all chunks intersecting with a cuboid are loaded. For any unloaded chunks, an attempt to load them may be performed, as determined by the load mode.- Parameters:
world- The world whose chunks to check.cuboid- The region to check. All chunks that are at least partially inside this cuboid will be checked.chunkLoadMode- The type of chunk loading to use if the chunk is not loaded.- Returns:
- The result of the action.
-
checkChunk
IChunkLoader.ChunkLoadResult checkChunk(IWorld world, IVector3D position, IChunkLoader.ChunkLoadMode chunkLoadMode) Checks if the chunk a position exists in is loaded.- Parameters:
world- The world whose chunks to check.position- The coordinates to check.chunkLoadMode- The type of chunk loading to use if the chunk is not loaded.- Returns:
- The result of the action.
-