resonant-induction/archive/java/resonantinduction/electrical/levitator/ThreadEMPathfinding.java
2014-01-11 17:44:07 +08:00

41 lines
709 B
Java

/**
*
*/
package resonantinduction.electrical.levitator;
import universalelectricity.api.vector.Vector3;
/**
* @author Calclavia
*
*/
public class ThreadEMPathfinding extends Thread
{
private boolean isCompleted = false;
private PathfinderEMContractor pathfinder;
private Vector3 start;
public ThreadEMPathfinding(PathfinderEMContractor pathfinder, Vector3 start)
{
this.pathfinder = pathfinder;
this.start = start;
this.setPriority(Thread.MIN_PRIORITY);
}
@Override
public void run()
{
this.pathfinder.findNodes(this.start);
this.isCompleted = true;
}
public PathfinderEMContractor getPath()
{
if (this.isCompleted)
{
return this.pathfinder;
}
return null;
}
}