Updated Instances (markdown)

TheMode 2020-05-03 18:03:04 +02:00
parent 7bb966cc6e
commit 2d64aa219f
1 changed files with 9 additions and 0 deletions

@ -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();
```