package org.tournier.minecraftregionmanager;

import java.io.File;

public class ChunkMark {
	// A chunk mark is defined by 4 items:
	private String worldName;
	private int x, z;
	private String chunkName;
	
	// Constructor
    public ChunkMark(String world, int cx, int cz, String name) {
        worldName = world;
        x = cx;
        z = cz;
        chunkName = name;
    }
    
    public String getWorldName() {
    	return worldName;
    }
    
    public int getX() {
    	return x;
    }
    
    public int getZ() {
    	return z;
    }
    
    public String getChunkName() {
    	return chunkName;
    }
    
    public File getFileName() {
		int rx = (int) Math.floor((double) x / 32);
		int rz = (int) Math.floor((double) z / 32);
    	File f = new File("./" + worldName + "/r." + rx + "." + rz + ".mca");
    	return f;
	}
    
    public String printMark() {
    	String s = worldName + ":" + x + "," + z + ":" + chunkName + " (blocks " + (x*16) + "," + (z*16) + " to " + ((x*16)+15) + "," + ((z*16)+15) + ")";
    	return s;
    }
}

@@ -87,17 +87,18 @@
 hunkMark
- 
+%0D%0A
 %7B%0D%0A%09// A
@@ -292,16 +292,21 @@
 ng name)
+%0D%0A   
  %7B%0D%0A    
@@ -431,24 +431,29 @@
 tWorldName()
+%0D%0A   
  %7B%0D%0A    %09ret
@@ -502,16 +502,21 @@
 t getX()
+%0D%0A   
  %7B%0D%0A    
@@ -561,16 +561,21 @@
 t getZ()
+%0D%0A   
  %7B%0D%0A    
@@ -627,24 +627,29 @@
 tChunkName()
+%0D%0A   
  %7B%0D%0A    %09ret
@@ -710,13 +710,17 @@
 me()
+%0D%0A   
  %7B%0D%0A
-%09
 %09int
@@ -761,17 +761,16 @@
 / 32);%0D%0A
-%09
 %09int rz 
@@ -899,17 +899,20 @@
 urn f;%0D%0A
-%09
+    
 %7D%0D%0A    %0D
@@ -941,16 +941,21 @@
 ntMark()
+%0D%0A   
  %7B%0D%0A    

Update to v1.00