restructure a couple things.

This commit is contained in:
boy0001
2015-09-22 23:23:28 +10:00
parent c948b18239
commit d42ef3cf63
101 changed files with 2846 additions and 2586 deletions

View File

@ -33,4 +33,29 @@ public class RegionWrapper {
public boolean isIn(final int x, final int z) {
return ((x >= minX) && (x <= maxX) && (z >= minZ) && (z <= maxZ));
}
@Override
public int hashCode() {
return minX + 13 * maxX + 23 * minZ + 39 * maxZ;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj instanceof RegionWrapper) {
RegionWrapper other = (RegionWrapper) obj;
return minX == other.minX && minZ == other.minZ && minY == other.minY && maxX == other.maxX && maxZ == other.maxZ && maxY == other.maxY;
}
return false;
}
@Override
public String toString() {
return minX + "->" + maxX + "," + minZ + "->" + maxZ;
}
}