remove redundant classes that are in mantle, use mantle's implementations

This commit is contained in:
Progwml6 committed 2013-12-01 19:46:08 -05:00
1 parent a181dc9dcf
commit b57eb8bed1
21 files changed
+87 -239

No files matched your search

@@ -1,104 +0,0 @@
package tconstruct.library.util;
public class CoordTuple implements Comparable
{
public final int x;
public final int y;
public final int z;
public CoordTuple(int posX, int posY, int posZ)
{
x = posX;
y = posY;
z = posZ;
}
public CoordTuple(double posX, double posY, double posZ)
{
x = (int) Math.floor(posX);
y = (int) Math.floor(posY);
z = (int) Math.floor(posZ);
}
public CoordTuple(CoordTuple tuple)
{
x = tuple.x;
y = tuple.y;
z = tuple.z;
}
public boolean equalCoords (int posX, int posY, int posZ)
{
if (this.x == posX && this.y == posY && this.z == posZ)
return true;
else
return false;
}
@Override
public boolean equals (Object obj)
{
if (obj == null)
return false;
if (getClass() == obj.getClass())
{
CoordTuple coord = (CoordTuple) obj;
if (this.x == coord.x && this.y == coord.y && this.z == coord.z)
return true;
}
return false;
}
@Override
public int hashCode ()
{
final int prime = 31;
int result = 1;
result = prime * result + x;
result = prime * result + y;
result = prime * result + z;
return result;
}
public String toString ()
{
return "X: " + x + ", Y: " + y + ", Z: " + z;
}
@Override
public int compareTo (Object o)
{
if (o == null)
throw new NullPointerException("Object cannot be null");
CoordTuple coord = (CoordTuple) o;
if (x < coord.x)
{
return -1;
}
if (x > coord.x)
{
return 1;
}
if (y < coord.y)
{
return -1;
}
if (y > coord.y)
{
return 1;
}
if (z < coord.z)
{
return -1;
}
if (z > coord.z)
{
return 1;
}
return 0;
}
}
@@ -1,19 +0,0 @@
package tconstruct.library.util;
public class CoordTuplePair
{
public CoordTuple a;
public CoordTuple b;
public CoordTuplePair(CoordTuple a, CoordTuple b)
{
this.a = a;
this.b = b;
}
public CoordTuplePair(int aX, int aY, int aZ, int bX, int bY, int bZ)
{
this.a = new CoordTuple(aX, aY, aZ);
this.b = new CoordTuple(bX, bY, bZ);
}
}
@@ -1,25 +0,0 @@
package tconstruct.library.util;
import java.util.Comparator;
public class CoordTupleSort implements Comparator
{
@Override
public int compare (Object o1, Object o2)
{
CoordTuple c1 = (CoordTuple) o1;
CoordTuple c2 = (CoordTuple) o2;
//Sort by y, then x, then z
if (c1.y != c2.y)
return c1.y - c2.y;
if (c1.x != c2.x)
return c1.x - c2.x;
if (c1.z != c2.z)
return c1.z - c2.z;
return 0;
}
}
@@ -1,8 +0,0 @@
package tconstruct.library.util;
public interface IActiveLogic
{
public boolean getActive ();
public void setActive (boolean flag);
}
@@ -1,5 +1,6 @@
package tconstruct.library.util;
import mantle.world.CoordTuple;
import net.minecraft.world.World;
public interface IServantLogic