Fixed pixlepix’s diversion transporter

This commit is contained in:
Aidan Brady 2013-11-25 16:50:55 -05:00
parent 19feb2e602
commit 028c6f8aea

View file

@ -189,30 +189,6 @@ public final class TransporterPathfinder
if(tile != null)
{
TileEntity currTile = pointer.getTileEntity(worldObj);
if(currTile instanceof TileEntityDiversionTransporter)
{
int mode = ((TileEntityDiversionTransporter)currTile).modes[side.ordinal()];
boolean redstone = currTile.worldObj.isBlockIndirectlyGettingPowered(currTile.xCoord, currTile.yCoord, currTile.zCoord);
if((mode == 2 && redstone == true) || (mode == 1 && redstone == false))
{
continue;
}
}
if(tile instanceof TileEntityDiversionTransporter)
{
int mode = ((TileEntityDiversionTransporter)tile).modes[side.ordinal()];
boolean redstone = tile.worldObj.isBlockIndirectlyGettingPowered(tile.xCoord, tile.yCoord, tile.zCoord);
if((mode == 2 && redstone == true) || (mode == 1 && redstone == false))
{
continue;
}
}
if(Object3D.get(tile).equals(transportStack.originalLocation))
{
continue;
@ -439,6 +415,7 @@ public final class TransporterPathfinder
if(transportStack.canInsertToTransporter(neighbor.getTileEntity(worldObj)))
{
TileEntity tile = neighbor.getTileEntity(worldObj);
double tentativeG = gScore.get(currentNode) + currentNode.distanceTo(neighbor);
if(neighbor.getMetadata(worldObj) == 4)
@ -453,6 +430,30 @@ public final class TransporterPathfinder
continue;
}
}
TileEntity currTile = currentNode.getTileEntity(worldObj);
if(currTile instanceof TileEntityDiversionTransporter)
{
int mode = ((TileEntityDiversionTransporter)currTile).modes[i];
boolean redstone = currTile.worldObj.isBlockIndirectlyGettingPowered(currTile.xCoord, currTile.yCoord, currTile.zCoord);
if((mode == 2 && redstone == true) || (mode == 1 && redstone == false))
{
continue;
}
}
if(tile instanceof TileEntityDiversionTransporter)
{
int mode = ((TileEntityDiversionTransporter)tile).modes[ForgeDirection.getOrientation(i).getOpposite().ordinal()];
boolean redstone = tile.worldObj.isBlockIndirectlyGettingPowered(tile.xCoord, tile.yCoord, tile.zCoord);
if((mode == 2 && redstone == true) || (mode == 1 && redstone == false))
{
continue;
}
}
if(!openSet.contains(neighbor) || tentativeG < gScore.get(neighbor))
{