Class WorldFile

java.lang.Object
com.ardorcraft.file.WorldFile

public final class WorldFile extends Object
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 Details

  • Method Details

    • close

      public void close() throws IOException
      Throws:
      IOException
    • size

      public long size() throws IOException
      Throws:
      IOException
    • contains

      public boolean contains(int x, int z)
    • remap

      public void remap() throws IOException
      Throws:
      IOException
    • save

      public void save(int x, int z, byte[] dataSource) throws IOException
      Throws:
      IOException
    • load

      public byte[] load(int x, int z) throws IOException
      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)