Applied-Energistics-2-tiler.../src/main/java/appeng/me/GridSplitDetector.java

25 lines
396 B
Java
Raw Normal View History

2014-09-24 02:26:27 +02:00
package appeng.me;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IGridVisitor;
class GridSplitDetector implements IGridVisitor
{
final IGridNode pivot;
boolean pivotFound;
public GridSplitDetector(IGridNode pivot) {
this.pivot = pivot;
}
@Override
public boolean visitNode(IGridNode n)
{
if ( n == pivot )
pivotFound = true;
return !pivotFound;
}
};