Package com.ardorcraft.file
Class WorldFile
java.lang.Object
com.ardorcraft.file.WorldFile
ArdorCraft map file format
Layout of each chunk data in the file:
- byte 0 = this key (long, 8)
- byte 8 = next key pos (long, 8)
- byte 16 = this pos (long, 8 (0 = +4, >0 = to start of next "this pos"))
- byte 24 = data size (int, 4)
- byte 28 = compressed data (byte[])
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleancontains(int x, int z) static intgetCoordinateX(long key) static intgetCoordinateZ(long key) static longgetKey(int x, int z) byte[]load(int x, int z) voidremap()voidsave(int x, int z, byte[] dataSource) longsize()
-
Constructor Details
-
WorldFile
- Throws:
Exception
-
-
Method Details
-
close
- Throws:
IOException
-
size
- Throws:
IOException
-
contains
public boolean contains(int x, int z) -
remap
- Throws:
IOException
-
save
- Throws:
IOException
-
load
- Throws:
IOException
-
getKey
public static long getKey(int x, int z) -
getCoordinateX
public static int getCoordinateX(long key) -
getCoordinateZ
public static int getCoordinateZ(long key)
-