Class AnvilLoader
java.lang.Object
net.minestom.server.instance.anvil.AnvilLoader
- All Implemented Interfaces:
ChunkLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidloadInstance(Instance instance) Loads instance data from the loader.voidSaves aChunkwith an optional callback for when it is done.voidsaveInstance(Instance instance) booleanSupports for instance/chunk loading in virtual threads.booleanSupports for instance/chunk saving in virtual threads.voidunloadChunk(Chunk chunk) Unload a given chunk.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChunkLoader
saveChunks
-
Constructor Details
-
AnvilLoader
-
AnvilLoader
-
-
Method Details
-
loadInstance
Description copied from interface:ChunkLoaderLoads instance data from the loader.- Specified by:
loadInstancein interfaceChunkLoader- Parameters:
instance- the instance to retrieve the data from
-
loadChunk
Description copied from interface:ChunkLoader- Specified by:
loadChunkin interfaceChunkLoader- Parameters:
instance- theInstancewhere theChunkbelongchunkX- the chunk XchunkZ- the chunk Z- Returns:
- the chunk, or null if not present
-
saveInstance
- Specified by:
saveInstancein interfaceChunkLoader
-
saveChunk
Description copied from interface:ChunkLoaderSaves aChunkwith an optional callback for when it is done.- Specified by:
saveChunkin interfaceChunkLoader- Parameters:
chunk- theChunkto save
-
unloadChunk
Unload a given chunk. Also unloads a region when no chunk from that region is loaded.- Specified by:
unloadChunkin interfaceChunkLoader- Parameters:
chunk- the chunk to unload
-
supportsParallelLoading
public boolean supportsParallelLoading()Description copied from interface:ChunkLoaderSupports for instance/chunk loading in virtual threads.- Specified by:
supportsParallelLoadingin interfaceChunkLoader- Returns:
- true if the chunk loader supports parallel loading
-
supportsParallelSaving
public boolean supportsParallelSaving()Description copied from interface:ChunkLoaderSupports for instance/chunk saving in virtual threads.- Specified by:
supportsParallelSavingin interfaceChunkLoader- Returns:
- true if the chunk loader supports parallel saving
-