Basic enhancement of the grid for overall usage

has some performance improvement
replaced outdated classes
This commit is contained in:
thatsIch
2014-11-30 04:58:08 +01:00
parent 6a38893017
commit 8abf2ed8ac
8 changed files with 741 additions and 663 deletions
+9 -7
View File
@@ -18,28 +18,30 @@
package appeng.me;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IGridVisitor;
public class GridPropagator implements IGridVisitor
{
final private Grid g;
public GridPropagator(Grid g) {
public GridPropagator( Grid g )
{
this.g = g;
}
@Override
public boolean visitNode(IGridNode n)
public boolean visitNode( IGridNode n )
{
GridNode gn = (GridNode) n;
if ( gn.myGrid != g || g.pivot == n )
GridNode gn = ( GridNode ) n;
if ( gn.getMyGrid() != this.g || this.g.getPivot() == n )
{
gn.setGrid( g );
gn.setGrid( this.g );
return true;
}
return false;
}
}