Work on transporters, don't use them unless you like buggy item transport pipes that currently do nothing

This commit is contained in:
Aidan Brady committed 2013-10-20 22:47:20 -04:00
1 parent 5b44e0f409
commit 4b82ab6cc1
11 files changed
+556 -8

No files matched your search

+31
View File
@@ -82,6 +82,26 @@ public class Object3D
return new Object3D(nbtTags.getInteger("x"), nbtTags.getInteger("y"), nbtTags.getInteger("z"), nbtTags.getInteger("dimensionId"));
}
public Object3D difference(Object3D other)
{
return new Object3D(xCoord-other.xCoord, yCoord-other.yCoord, zCoord-other.zCoord);
}
public ForgeDirection sideDifference(Object3D other)
{
Object3D diff = difference(other);
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
{
if(side.offsetX == xCoord && side.offsetY == yCoord && side.offsetZ == zCoord)
{
return side;
}
}
return ForgeDirection.UNKNOWN;
}
public int distanceTo(Object3D obj)
{
int subX = xCoord - obj.xCoord;
@@ -95,6 +115,17 @@ public class Object3D
return world.getBlockId(xCoord+side.offsetX, yCoord+side.offsetY, zCoord+side.offsetZ) == 0;
}
public Object3D step(ForgeDirection side)
{
return translate(side.offsetX, side.offsetY, side.offsetZ);
}
@Override
public String toString()
{
return "[Object3D: " + xCoord + ", " + yCoord + ", " + zCoord + "]";
}
@Override
public boolean equals(Object obj)
{