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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
contains
(int x, int z) static int
getCoordinateX
(long key) static int
getCoordinateZ
(long key) static long
getKey
(int x, int z) byte[]
load
(int x, int z) void
remap()
void
save
(int x, int z, byte[] dataSource) long
size()
-
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)
-