public class TridentWorldLoader extends Object implements WorldLoader
| Modifier and Type | Field and Description |
|---|---|
static Map<String,TridentWorld> |
WORLDS |
| Constructor and Description |
|---|
TridentWorldLoader() |
TridentWorldLoader(WorldCreateOptions opt) |
| Modifier and Type | Method and Description |
|---|---|
List<FeatureGenerator> |
brushes()
Obtains a mutable collection of the overlay brushes used to generate the world
|
boolean |
chunkExists(ChunkLocation location)
Checks the existence of a chunk in a world, based on the world directory
|
boolean |
chunkExists(int x,
int z)
Checks the existence of a chunk in a world, based on the world directory
|
World |
createWorld(String name)
Creates a new world
|
ChunkGenerator |
generator()
The generator used to load new chunks used by this world loader
|
World |
load(String world)
Load an existing world inside the server's file container
|
static void |
loadAll() |
TridentChunk |
loadChunk(ChunkLocation location)
Loads the chunk into the world
|
Chunk |
loadChunk(int x,
int z)
Loads the chunk into the world
|
WorldCreateOptions |
options()
Options used for creating the world
|
void |
save()
Writes the changes made to the world to the world folder
|
void |
saveChunk(Chunk chunk)
Writes the changes in the chunk to the world file
|
void |
setGenerator(long seed) |
Collection<TridentWorld> |
worlds() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewLoader, newLoader, worldExistspublic static final Map<String,TridentWorld> WORLDS
public TridentWorldLoader(WorldCreateOptions opt)
public TridentWorldLoader()
public Collection<TridentWorld> worlds()
@InternalUseOnly public static void loadAll()
public World load(String world)
WorldLoaderload in interface WorldLoaderworld - the name of the folder containing a worldpublic void save()
WorldLoadersave in interface WorldLoaderpublic World createWorld(String name)
WorldLoadercreateWorld in interface WorldLoadername - the name of the new worldpublic boolean chunkExists(int x, int z)
WorldLoaderchunkExists in interface WorldLoaderx - the X coordinate of the chunkz - the Z coordinate of the chunktrue if the chunk is not present within the world directorypublic boolean chunkExists(ChunkLocation location)
WorldLoaderchunkExists in interface WorldLoaderlocation - the position which the chunk should be checked for existencetrue if the chunk is not present within the world directorypublic Chunk loadChunk(int x, int z)
WorldLoaderloadChunk in interface WorldLoaderx - the X of the chunkz - the Z of the chunkpublic TridentChunk loadChunk(ChunkLocation location)
WorldLoaderloadChunk in interface WorldLoaderlocation - the position of the chunk to loadpublic void saveChunk(Chunk chunk)
WorldLoadersaveChunk in interface WorldLoaderchunk - the chunk which to write the changespublic WorldCreateOptions options()
WorldLoaderoptions in interface WorldLoaderpublic void setGenerator(long seed)
public ChunkGenerator generator()
WorldLoadergenerator in interface WorldLoaderpublic List<FeatureGenerator> brushes()
WorldLoaderbrushes in interface WorldLoaderCopyright © 2016. All rights reserved.