Minor Changes

Minor changes to DimLink to simplify DimLink.getDestinationOrientation()
and to clarify the output of DimLink.toString() when no destination is
available.
This commit is contained in:
SenseiKiwi 2014-07-10 18:29:48 -04:00
parent b197237dfd
commit 79bd5102ba

View file

@ -63,12 +63,12 @@ public abstract class DimLink
public int getDestinationOrientation()
{
DimLink link = PocketManager.getLink(this.destination().getX(), this.destination().getY(), this.destination().getZ(), this.destination().getDimension());
if(link !=null)
DimLink destinationLink = PocketManager.getLink(tail.getDestination());
if (destinationLink != null)
{
return link.orientation();
return destinationLink.orientation();
}
return (this.orientation()+2)%4;
return (link.orientation + 2) % 4;
}
public boolean hasDestination()
@ -104,6 +104,6 @@ public abstract class DimLink
@Override
public String toString()
{
return link.point + " -> " + (hasDestination() ? destination() : "");
return link.point + " -> " + (hasDestination() ? destination() : "()");
}
}