Flipped a Table

Replaced several core classes from DD with new classes to enforce
integrity checks. Rewriting everything that depended on those classes is
a massive undertaking but it should simplify our code and prevent the
many bugs we've seen lately. The rewrite isn't done yet, just committing
my progress so far.
This commit is contained in:
SenseiKiwi
2013-08-29 02:14:24 -04:00
parent 050bdd1090
commit 934dcfde3d
61 changed files with 3450 additions and 4233 deletions

View File

@@ -1,7 +1,7 @@
package StevenDimDoors.mod_pocketDim.util;
public final class Point4D
public final class Point4D implements Comparable<Point4D>
{
private final int x;
private final int y;
@@ -135,6 +135,21 @@ public final class Point4D
return (x == other.x && y == other.y && z == other.z && dimension == other.dimension);
}
@Override
public int compareTo(Point4D other)
{
int diff = x - other.x;
if (diff != 0)
return diff;
diff = y - other.y;
if (diff != 0)
return diff;
diff = z - other.z;
if (diff != 0)
return diff;
return dimension - other.dimension;
}
@Override
public String toString()
{