Various Fixes #166

Merged
SenseiKiwi merged 19 commits from master into master 2014-06-26 23:17:34 +00:00
7 changed files with 14 additions and 14 deletions
Showing only changes of commit fe035f6677 - Show all commits

View File

@@ -574,7 +574,7 @@ public class DDTeleporter
Point3D destination = yCoordHelper.findDropPoint(world, source.getX(), source.getY() + 1, source.getZ()); Point3D destination = yCoordHelper.findDropPoint(world, source.getX(), source.getY() + 1, source.getZ());
if (destination != null) if (destination != null)
{ {
current.root().setDestination(link, destination.getX(), destination.getY(), destination.getZ()); current.root().setLinkDestination(link, destination.getX(), destination.getY(), destination.getZ());
return true; return true;
} }
} }
@@ -745,7 +745,7 @@ public class DDTeleporter
int orientation = getDestinationOrientation(source, properties); int orientation = getDestinationOrientation(source, properties);
NewDimData sourceDim = PocketManager.getDimensionData(link.source().getDimension()); NewDimData sourceDim = PocketManager.getDimensionData(link.source().getDimension());
DimLink reverse = destinationDim.createLink(x, y + 2, z, LinkTypes.REVERSE,orientation); DimLink reverse = destinationDim.createLink(x, y + 2, z, LinkTypes.REVERSE,orientation);
sourceDim.setDestination(reverse, source.getX(), source.getY(), source.getZ()); sourceDim.setLinkDestination(reverse, source.getX(), source.getY(), source.getZ());
// Set up the warp door at the destination // Set up the warp door at the destination
orientation = BlockRotator.transformMetadata(orientation, 2, properties.WarpDoorID); orientation = BlockRotator.transformMetadata(orientation, 2, properties.WarpDoorID);
@@ -753,7 +753,7 @@ public class DDTeleporter
// Complete the link to the destination // Complete the link to the destination
// This comes last so the destination isn't set unless everything else works first // This comes last so the destination isn't set unless everything else works first
destinationDim.setDestination(link, x, y + 2, z); destinationDim.setLinkDestination(link, x, y + 2, z);
} }
return (destination != null); return (destination != null);

View File

@@ -503,7 +503,7 @@ public abstract class NewDimData
{ {
throw new IllegalArgumentException("orientation must be between 0 and 3, inclusive."); throw new IllegalArgumentException("orientation must be between 0 and 3, inclusive.");
} }
setDestination(incoming, originX, originY, originZ); setLinkDestination(incoming, originX, originY, originZ);
this.origin = incoming.destination(); this.origin = incoming.destination();
this.orientation = orientation; this.orientation = orientation;
this.dungeon = dungeon; this.dungeon = dungeon;
@@ -566,13 +566,13 @@ public abstract class NewDimData
throw new IllegalStateException("The dimension has already been initialized."); throw new IllegalStateException("The dimension has already been initialized.");
} }
setDestination(incoming, originX, originY, originZ); setLinkDestination(incoming, originX, originY, originZ);
this.origin = incoming.destination(); this.origin = incoming.destination();
this.orientation = orientation; this.orientation = orientation;
this.modified = true; this.modified = true;
} }
public void setDestination(DimLink incoming, int x, int y, int z) public void setLinkDestination(DimLink incoming, int x, int y, int z)
{ {
InnerDimLink link = (InnerDimLink) incoming; InnerDimLink link = (InnerDimLink) incoming;
link.setDestination(x, y, z, this); link.setDestination(x, y, z, this);

View File

@@ -325,7 +325,7 @@ public class DungeonSchematic extends Schematic {
DimLink reverseLink = dimension.createLink(pocketCenter.getX(), pocketCenter.getY(), pocketCenter.getZ(), LinkTypes.REVERSE, orientation); DimLink reverseLink = dimension.createLink(pocketCenter.getX(), pocketCenter.getY(), pocketCenter.getZ(), LinkTypes.REVERSE, orientation);
Point4D destination = entryLink.source(); Point4D destination = entryLink.source();
NewDimData prevDim = PocketManager.getDimensionData(destination.getDimension()); NewDimData prevDim = PocketManager.getDimensionData(destination.getDimension());
prevDim.setDestination(reverseLink, destination.getX(), destination.getY(), destination.getZ()); prevDim.setLinkDestination(reverseLink, destination.getX(), destination.getY(), destination.getZ());
initDoorTileEntity(world, pocketCenter); initDoorTileEntity(world, pocketCenter);
} }

View File

@@ -76,8 +76,8 @@ public class ItemRiftSignature extends Item
NewDimData destinationDimension = PocketManager.getDimensionData(world); NewDimData destinationDimension = PocketManager.getDimensionData(world);
DimLink link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.NORMAL,source.getOrientation()); DimLink link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.NORMAL,source.getOrientation());
DimLink reverse = destinationDimension.createLink(x, adjustedY, z, LinkTypes.NORMAL,orientation); DimLink reverse = destinationDimension.createLink(x, adjustedY, z, LinkTypes.NORMAL,orientation);
destinationDimension.setDestination(link, x, adjustedY, z); destinationDimension.setLinkDestination(link, x, adjustedY, z);
sourceDimension.setDestination(reverse, source.getX(), source.getY(), source.getZ()); sourceDimension.setLinkDestination(reverse, source.getX(), source.getY(), source.getZ());
//Try placing a rift at the destination point //Try placing a rift at the destination point
if (!mod_pocketDim.blockRift.isBlockImmune(world, x, adjustedY, z)) if (!mod_pocketDim.blockRift.isBlockImmune(world, x, adjustedY, z))

View File

@@ -67,7 +67,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
{ {
// Only the source-to-destination link is needed. // Only the source-to-destination link is needed.
link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.NORMAL, source.getOrientation()); link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.NORMAL, source.getOrientation());
destinationDimension.setDestination(link, x, adjustedY, z); destinationDimension.setLinkDestination(link, x, adjustedY, z);
} }
else else
{ {
@@ -86,8 +86,8 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
// Create links connecting the two endpoints. // Create links connecting the two endpoints.
link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.NORMAL, source.getOrientation()); link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.NORMAL, source.getOrientation());
reverse = destinationDimension.createLink(x, adjustedY, z, LinkTypes.NORMAL, orientation); reverse = destinationDimension.createLink(x, adjustedY, z, LinkTypes.NORMAL, orientation);
destinationDimension.setDestination(link, x, adjustedY, z); destinationDimension.setLinkDestination(link, x, adjustedY, z);
sourceDimension.setDestination(reverse, source.getX(), source.getY(), source.getZ()); sourceDimension.setLinkDestination(reverse, source.getX(), source.getY(), source.getZ());
// Try placing a rift at the destination point // Try placing a rift at the destination point
if (!mod_pocketDim.blockRift.isBlockImmune(world, x, adjustedY, z)) if (!mod_pocketDim.blockRift.isBlockImmune(world, x, adjustedY, z))

View File

@@ -201,7 +201,7 @@ public class DDSaveHandler
Point4D destination = packedLink.tail.destination; Point4D destination = packedLink.tail.destination;
if(destination!=null) if(destination!=null)
{ {
PocketManager.getDimensionData(destination.getDimension()).setDestination(link, destination.getX(),destination.getY(),destination.getZ()); PocketManager.getDimensionData(destination.getDimension()).setLinkDestination(link, destination.getX(),destination.getY(),destination.getZ());
} }
unpackedLinks.add(packedLink); unpackedLinks.add(packedLink);
} }

View File

@@ -415,7 +415,7 @@ public class PocketBuilder
//Place a link leading back out of the pocket //Place a link leading back out of the pocket
DimLink reverseLink = dimension.createLink(source.getX(), destinationY, source.getZ(), LinkTypes.REVERSE,(link.orientation()+2)%4); DimLink reverseLink = dimension.createLink(source.getX(), destinationY, source.getZ(), LinkTypes.REVERSE,(link.orientation()+2)%4);
parent.setDestination(reverseLink, source.getX(), source.getY(), source.getZ()); parent.setLinkDestination(reverseLink, source.getX(), source.getY(), source.getZ());
//Build the actual pocket area //Build the actual pocket area
buildPocket(world, source.getX(), destinationY, source.getZ(), orientation, size, wallThickness, properties, door); buildPocket(world, source.getX(), destinationY, source.getZ(), orientation, size, wallThickness, properties, door);