mirror of https://github.com/Minestom/Minestom.git
Updated Instances (markdown)
parent
7bb966cc6e
commit
2d64aa219f
|
@ -23,4 +23,13 @@ SharedInstance sharedInstance = instanceManager.createSharedInstance(instanceCon
|
|||
Instances do need to have a ChunkGenerator specified, without it no chunk can be generated.
|
||||
```java
|
||||
instance.setChunkGenerator(YOUR_GENERATOR);
|
||||
```
|
||||
|
||||
It is also important to notice that, by default, the chunks of the instance are only stored in memory. In order to have them stored in file in a persistent way you need to specify a "chunk folder" and to save regularly manually
|
||||
|
||||
```java
|
||||
// Here is how to create an instance having a chunk folder
|
||||
InstanceContainer instanceContainer = instanceManager.createInstanceContainer(YOUR_CHUNK_FOLDER);
|
||||
// Save all chunks to files, you can specify a callback in order to know when the saving is done
|
||||
instanceContainer.saveChunksToFolder();
|
||||
```
|
Loading…
Reference in New Issue