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:
parent
b197237dfd
commit
79bd5102ba
1 changed files with 5 additions and 5 deletions
|
@ -63,12 +63,12 @@ public abstract class DimLink
|
||||||
|
|
||||||
public int getDestinationOrientation()
|
public int getDestinationOrientation()
|
||||||
{
|
{
|
||||||
DimLink link = PocketManager.getLink(this.destination().getX(), this.destination().getY(), this.destination().getZ(), this.destination().getDimension());
|
DimLink destinationLink = PocketManager.getLink(tail.getDestination());
|
||||||
if(link !=null)
|
if (destinationLink != null)
|
||||||
{
|
{
|
||||||
return link.orientation();
|
return destinationLink.orientation();
|
||||||
}
|
}
|
||||||
return (this.orientation()+2)%4;
|
return (link.orientation + 2) % 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasDestination()
|
public boolean hasDestination()
|
||||||
|
@ -104,6 +104,6 @@ public abstract class DimLink
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return link.point + " -> " + (hasDestination() ? destination() : "");
|
return link.point + " -> " + (hasDestination() ? destination() : "()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue