Applied-Energistics-2-tiler.../me/GridSplitDetector.java
2013-12-27 16:59:59 -06:00

24 lines
420 B
Java

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;
}
};