public class ZippedMcRegionChunkStore extends McRegionChunkStore
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
folder |
protected java.util.zip.ZipFile |
zip |
protected java.io.File |
zipFile |
cachedReader, curFilename
CHUNK_SHIFTS, CHUNK_SHIFTS_Y
Constructor and Description |
---|
ZippedMcRegionChunkStore(java.io.File zipFile)
Create an instance.
|
ZippedMcRegionChunkStore(java.io.File zipFile,
java.lang.String folder)
Create an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected java.io.InputStream |
getInputStream(java.lang.String name,
java.lang.String worldName)
Get the input stream for a chunk file.
|
boolean |
isValid()
Returns whether the chunk store is of this type.
|
getChunkTag, getFilename, getReader
getChunk, toChunk, toChunk3d
protected java.io.File zipFile
protected java.util.zip.ZipFile zip
protected java.lang.String folder
public ZippedMcRegionChunkStore(java.io.File zipFile, java.lang.String folder) throws java.io.IOException, java.util.zip.ZipException
zipFile
- the ZIP filefolder
- the folderjava.io.IOException
- if there is an error opening the zipjava.util.zip.ZipException
- if there is an error opening the zippublic ZippedMcRegionChunkStore(java.io.File zipFile) throws java.io.IOException, java.util.zip.ZipException
zipFile
- the ZIP filejava.io.IOException
- if there is an error opening the zipjava.util.zip.ZipException
- if there is an error opening the zipprotected java.io.InputStream getInputStream(java.lang.String name, java.lang.String worldName) throws java.io.IOException, DataException
McRegionChunkStore
getInputStream
in class McRegionChunkStore
name
- the name of the chunk fileworldName
- the world namejava.io.IOException
- if there is an error getting the chunk dataDataException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class McRegionChunkStore
java.io.IOException
public boolean isValid()
ChunkStore
isValid
in class ChunkStore