Slime loader is a map loader & saver for the file format Slime as specified here implemented in Minestom.
Features:
- [x] World loading
- [x] Blocks
- [x] TileEntities
- [ ] Entities
- [x] Extra Data
(Data will be loaded into the instance's "Data" Tag)
- [ ] World saving
- [ ] Blocks
- [ ] TileEntities
- [ ] Entities
- [ ] Extra Data
(Data from "Data" Tag will be saved)
- [ ] Async
Add the following to your build.gradle.kts
repositories {
maven("https://jitpack.io")
}
dependencies {
implementation("com.github.CatDevz:SlimeLoader:master-SNAPSHOT")
}
The library is quite simple to use. If you need to get your slime world from somewhere else (ex. AWS S3) you can implement the SlimeSource
interface.
val instanceManager = MinecraftServer.getInstanceManager()
val instanceContainer = instanceManager.createInstanceContainer()
val file = File("Slime file goes here")
val slimeSource: SlimeSource = FileSlimeSource(file)
val slimeLoader: IChunkLoader = SlimeLoader(instanceContainer, slimeSource)
instanceContainer.chunkLoader = slimeLoader
InstanceManager instanceManager = MinecraftServer.getInstanceManager();
InstanceContainer instanceContainer = instanceManager.createInstanceContainer();
File file = new File("Slime file goes here");
SlimeSource slimeSource = new FileSlimeSource(file);
SlimeLoader slimeLoader = new SlimeLoader(instanceContainer, slimeSource, false);
instanceContainer.setChunkLoader(slimeLoader);
SlimeLoader is licensed under the MIT license