Cleaned up documentation, added lacking Java annotations.

This commit is contained in:
sk89q
2011-02-18 15:49:50 -08:00
parent e5a25496b2
commit e94c1d4874
49 changed files with 269 additions and 140 deletions

View File

@ -52,6 +52,7 @@ public class AlphaChunkStore extends NestedFileChunkStore {
* @throws DataException
* @throws IOException
*/
@Override
protected InputStream getInputStream(String f1, String f2, String name)
throws DataException, IOException {
String file = f1 + File.separator + f2 + File.separator + name;

View File

@ -38,12 +38,13 @@ public class Chunk {
private byte[] data;
private int rootX;
private int rootZ;
Map<BlockVector,Map<String,Tag>> tileEntities;
private Map<BlockVector,Map<String,Tag>> tileEntities;
/**
* Construct the chunk with a compound tag.
*
* @param rootTag
* @param tag
* @throws DataException
*/
public Chunk(CompoundTag tag) throws DataException {
rootTag = tag;

View File

@ -34,8 +34,6 @@ public abstract class ChunkStore {
*
* @param pos
* @return
* @throws ChunkStoreException
* @throws IOException
*/
public static BlockVector2D toChunk(Vector pos) {
int chunkX = (int)Math.floor(pos.getBlockX() / 16.0);
@ -58,8 +56,7 @@ public abstract class ChunkStore {
/**
* Get a chunk at a location.
*
* @param x
* @param z
* @param pos
* @return
* @throws ChunkStoreException
* @throws IOException

View File

@ -56,7 +56,6 @@ public abstract class NestedFileChunkStore extends ChunkStore {
* separator.
*
* @param pos
* @param separator
* @return
*/
public static String getFilename(Vector2D pos) {
@ -71,6 +70,7 @@ public abstract class NestedFileChunkStore extends ChunkStore {
* @throws DataException
* @throws IOException
*/
@Override
public CompoundTag getChunkTag(Vector2D pos)
throws DataException, IOException {
int x = pos.getBlockX();

View File

@ -89,6 +89,7 @@ public class TrueZipAlphaChunkStore extends NestedFileChunkStore {
* @throws DataException
* @throws IOException
*/
@Override
protected InputStream getInputStream(String f1, String f2, String name)
throws DataException, IOException {
String file = f1 + File.separator + f2 + File.separator + name;

View File

@ -54,7 +54,7 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore {
* @param zipFile
* @param folder
* @throws IOException
* @throws ZIPException
* @throws ZipException
*/
public TrueZipLegacyAlphaChunkStore(File zipFile, String folder)
throws IOException, ZipException {
@ -69,9 +69,8 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore {
* be detected.
*
* @param zipFile
* @param folder
* @throws IOException
* @throws ZIPException
* @throws ZipException
*/
public TrueZipLegacyAlphaChunkStore(File zipFile)
throws IOException, ZipException {
@ -90,6 +89,7 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore {
* @throws IOException
* @throws DataException
*/
@Override
@SuppressWarnings("unchecked")
protected InputStream getInputStream(String f1, String f2, String name)
throws IOException, DataException {
@ -160,6 +160,7 @@ public class TrueZipLegacyAlphaChunkStore extends NestedFileChunkStore {
*
* @throws IOException
*/
@Override
public void close() throws IOException {
zip.close();
}

View File

@ -52,7 +52,7 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore {
* @param zipFile
* @param folder
* @throws IOException
* @throws ZIPException
* @throws ZipException
*/
public ZippedAlphaChunkStore(File zipFile, String folder)
throws IOException, ZipException {
@ -67,9 +67,8 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore {
* be detected.
*
* @param zipFile
* @param folder
* @throws IOException
* @throws ZIPException
* @throws ZipException
*/
public ZippedAlphaChunkStore(File zipFile)
throws IOException, ZipException {
@ -88,6 +87,7 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore {
* @throws IOException
* @throws DataException
*/
@Override
protected InputStream getInputStream(String f1, String f2, String name)
throws IOException, DataException {
String file = f1 + "/" + f2 + "/" + name;
@ -157,6 +157,7 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore {
*
* @throws IOException
*/
@Override
public void close() throws IOException {
zip.close();
}