java.lang.Object
net.minestom.server.instance.anvil.AnvilLoader
- All Implemented Interfaces:
IChunkLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
loadInstance
(Instance instance) Loads instance data from the loader.void
Saves aChunk
with an optional callback for when it is done.void
saveInstance
(Instance instance) boolean
Supports for instance/chunk loading in virtual threads.boolean
Supports for instance/chunk saving in virtual threads.void
unloadChunk
(Chunk chunk) Unload a given chunk.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.instance.IChunkLoader
saveChunks
-
Constructor Details
-
AnvilLoader
-
AnvilLoader
-
-
Method Details
-
loadInstance
Description copied from interface:IChunkLoader
Loads instance data from the loader.- Specified by:
loadInstance
in interfaceIChunkLoader
- Parameters:
instance
- the instance to retrieve the data from
-
loadChunk
Description copied from interface:IChunkLoader
- Specified by:
loadChunk
in interfaceIChunkLoader
- Parameters:
instance
- theInstance
where theChunk
belongchunkX
- the chunk XchunkZ
- the chunk Z- Returns:
- the chunk, or null if not present
-
saveInstance
- Specified by:
saveInstance
in interfaceIChunkLoader
-
saveChunk
Description copied from interface:IChunkLoader
Saves aChunk
with an optional callback for when it is done.- Specified by:
saveChunk
in interfaceIChunkLoader
- Parameters:
chunk
- theChunk
to save
-
unloadChunk
Unload a given chunk. Also unloads a region when no chunk from that region is loaded.- Specified by:
unloadChunk
in interfaceIChunkLoader
- Parameters:
chunk
- the chunk to unload
-
supportsParallelLoading
public boolean supportsParallelLoading()Description copied from interface:IChunkLoader
Supports for instance/chunk loading in virtual threads.- Specified by:
supportsParallelLoading
in interfaceIChunkLoader
- Returns:
- true if the chunk loader supports parallel loading
-
supportsParallelSaving
public boolean supportsParallelSaving()Description copied from interface:IChunkLoader
Supports for instance/chunk saving in virtual threads.- Specified by:
supportsParallelSaving
in interfaceIChunkLoader
- Returns:
- true if the chunk loader supports parallel saving
-