public class ChunkProviderServer extends Object implements IChunkProvider
Modifier and Type | Field and Description |
---|---|
IChunkLoader |
currentChunkLoader |
boolean |
loadChunkOnProvideRequest
if this is false, the defaultEmptyChunk will be returned by the provider
|
Constructor and Description |
---|
ChunkProviderServer(WorldServer par1WorldServer,
IChunkLoader par2IChunkLoader,
IChunkProvider par3IChunkProvider) |
Modifier and Type | Method and Description |
---|---|
boolean |
canSave()
Returns if the IChunkProvider supports saving.
|
boolean |
chunkExists(int par1,
int par2)
Checks to see if a chunk exists at x, y
|
ChunkPosition |
findClosestStructure(World par1World,
String par2Str,
int par3,
int par4,
int par5)
Returns the location of the closest structure of the specified type.
|
void |
func_104112_b() |
int |
getLoadedChunkCount() |
List |
getPossibleCreatures(EnumCreatureType par1EnumCreatureType,
int par2,
int par3,
int par4)
Returns a list of creatures of the specified type that can spawn at the given location.
|
Chunk |
loadChunk(int par1,
int par2)
loads or generates the chunk at the chunk location specified
|
String |
makeString()
Converts the instance data to a readable string.
|
void |
populate(IChunkProvider par1IChunkProvider,
int par2,
int par3)
Populates chunk with ores etc etc
|
Chunk |
provideChunk(int par1,
int par2)
Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
specified chunk from the map seed and chunk seed
|
void |
recreateStructures(int par1,
int par2) |
boolean |
saveChunks(boolean par1,
IProgressUpdate par2IProgressUpdate)
Two modes of operation: if passed true, save all Chunks in one go.
|
void |
unloadAllChunks()
marks all chunks for unload, ignoring those near the spawn
|
void |
unloadChunksIfNotNearSpawn(int par1,
int par2)
marks chunk for unload by "unload100OldestChunks" if there is no spawn point, or if the center of the chunk is
outside 200 blocks (x or z) of the spawn
|
boolean |
unloadQueuedChunks()
Unloads chunks that are marked to be unloaded.
|
public IChunkLoader currentChunkLoader
public boolean loadChunkOnProvideRequest
public ChunkProviderServer(WorldServer par1WorldServer, IChunkLoader par2IChunkLoader, IChunkProvider par3IChunkProvider)
public boolean chunkExists(int par1, int par2)
chunkExists
in interface IChunkProvider
public void unloadChunksIfNotNearSpawn(int par1, int par2)
public void unloadAllChunks()
public Chunk loadChunk(int par1, int par2)
loadChunk
in interface IChunkProvider
public Chunk provideChunk(int par1, int par2)
provideChunk
in interface IChunkProvider
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
populate
in interface IChunkProvider
public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
saveChunks
in interface IChunkProvider
public void func_104112_b()
func_104112_b
in interface IChunkProvider
public boolean unloadQueuedChunks()
unloadQueuedChunks
in interface IChunkProvider
public boolean canSave()
canSave
in interface IChunkProvider
public String makeString()
makeString
in interface IChunkProvider
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
getPossibleCreatures
in interface IChunkProvider
public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int par4, int par5)
findClosestStructure
in interface IChunkProvider
public int getLoadedChunkCount()
getLoadedChunkCount
in interface IChunkProvider
public void recreateStructures(int par1, int par2)
recreateStructures
in interface IChunkProvider