Various Fixes #166

Merged
SenseiKiwi merged 19 commits from master into master 2014-06-26 23:17:34 +00:00
2 changed files with 12 additions and 5 deletions
Showing only changes of commit 448890207f - Show all commits

View File

@@ -219,10 +219,11 @@ public class ItemRiftSignature extends Item
{
private Point4D point;
private int orientation;
Point4DOrientation(int x, int y, int z, int orientation, int dimID)
{
this.point= new Point4D(x,y,z,dimID);
this.orientation=orientation;
this.point = new Point4D(x, y, z, dimID);
this.orientation = orientation;
}
int getX()
@@ -244,10 +245,16 @@ public class ItemRiftSignature extends Item
{
return point.getDimension();
}
int getOrientation()
{
return orientation;
}
Point4D getPoint()
{
return point;
}
}
}

View File

@@ -52,10 +52,10 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
if (source != null)
{
// Yes, it's initialized.
DimLink link;
DimLink reverse;
NewDimData sourceDimension = PocketManager.getDimensionData(source.getDimension());
NewDimData destinationDimension = PocketManager.getDimensionData(world);
DimLink reverse = destinationDimension.getLink(x, adjustedY, z);
DimLink link;
// Check whether the SRS is being used to restore one of its previous
// link pairs. In other words, the SRS is being used on a location
@@ -63,7 +63,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
// intention of overwriting the source-side link to point there.
// Those benign redirection operations will be handled for free.
if (false) //TODO Add proper check!
if (reverse != null && source.getPoint().equals(reverse.destination()))
{
// Only the source-to-destination link is needed.
link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.NORMAL, source.getOrientation());