public abstract class McRegionChunkStore extends ChunkStore
| Modifier and Type | Field and Description |
|---|---|
protected McRegionReader |
cachedReader |
protected String |
curFilename |
CHUNK_SHIFTS| Constructor and Description |
|---|
McRegionChunkStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close resources.
|
CompoundTag |
getChunkTag(Vector2D position,
World world)
Get the tag for a chunk.
|
static String |
getFilename(Vector2D position)
Get the filename of a region file.
|
protected abstract InputStream |
getInputStream(String name,
String worldName)
Get the input stream for a chunk file.
|
protected McRegionReader |
getReader(Vector2D pos,
String worldname) |
getChunk, isValid, toChunkprotected String curFilename
protected McRegionReader cachedReader
public static String getFilename(Vector2D position)
position - chunk positionprotected McRegionReader getReader(Vector2D pos, String worldname) throws DataException, IOException
DataExceptionIOExceptionpublic CompoundTag getChunkTag(Vector2D position, World world) throws DataException, IOException
ChunkStoregetChunkTag in class ChunkStoreposition - the position of the chunkDataException - thrown on data errorIOException - thrown on I/O errorprotected abstract InputStream getInputStream(String name, String worldName) throws IOException, DataException
name - the name of the chunk fileworldName - the world nameIOExceptionDataExceptionpublic void close()
throws IOException
ChunkStoreclose in class ChunkStoreIOException - on I/O errorCopyright © 2010-2014. All Rights Reserved.