redid orientation handling, works better now.

Vastly improved y level detection for teleports
This commit is contained in:
StevenRS11
2013-05-03 19:34:01 -04:00
parent 4f98555db5
commit 7c4feff0ea
18 changed files with 276 additions and 107 deletions

View File

@@ -467,8 +467,7 @@ public class dimHelper extends DimensionManager
LinkData linkData =new LinkData( locationDimID, destinationDimID, locationXCoord, locationYCoord, locationZCoord, destinationXCoord, destinationYCoord ,destinationZCoord,false);
linkData.linkOrientation=linkOrientation;
LinkData linkData =new LinkData( locationDimID, destinationDimID, locationXCoord, locationYCoord, locationZCoord, destinationXCoord, destinationYCoord ,destinationZCoord,false,linkOrientation);
return this.createLink(linkData);
@@ -637,18 +636,20 @@ public class dimHelper extends DimensionManager
{
this.initDimension(destinationID);
}
int locOrientation = linkData.linkOrientation;
int destOrientation = this.getLinkDataFromCoords(destX, destY, destZ, destinationID).linkOrientation;
int blockToReplace= this.getWorld(destinationID).getBlockId(destX, destY, destZ);
if(blockToReplace!=mod_pocketDim.dimDoorID&&blockToReplace!=mod_pocketDim.linkExitDoorID&&blockToReplace!=mod_pocketDim.linkDimDoorID&&blockToReplace!=mod_pocketDim.ExitDoorID&&blockToReplace!=mod_pocketDim.transientDoorID)
{
this.getWorld(destinationID).setBlock(destX, destY-1, destZ, doorTypeToPlace,dimHelper.instance.flipDoorMetadata(world.getBlockMetadata(locX, locY-1, locZ)),2);
this.getWorld(destinationID).setBlock(destX, destY-1, destZ, doorTypeToPlace,destOrientation,2);
this.getWorld(destinationID).setBlock(destX, destY, destZ, doorTypeToPlace,world.getBlockMetadata(locX, locY, locZ),2);
// System.out.println("Genned door");
}
if(id==mod_pocketDim.transientDoorID&&!dimHelper.dimList.get((destinationID)).hasBeenFilled)
{
this.getWorld(destinationID).setBlock(destX, destY-1, destZ, id,dimHelper.instance.flipDoorMetadata(world.getBlockMetadata(locX, locY-1, locZ)),2);
this.getWorld(destinationID).setBlock(destX, destY-1, destZ, id,destOrientation,2);
this.getWorld(destinationID).setBlock(destX, destY, destZ, id,world.getBlockMetadata(locX, locY, locZ),2);
}