Basic enhancement of the grid for overall usage
has some performance improvement replaced outdated classes
This commit is contained in:
@@ -18,10 +18,12 @@
|
||||
|
||||
package appeng.me;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.exceptions.FailedConnection;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.IGridConnection;
|
||||
@@ -75,18 +77,18 @@ public class GridConnection implements IGridConnection, IPathItem
|
||||
this.fromAtoB = fromAtoB;
|
||||
sideB = b;
|
||||
|
||||
if ( b.myGrid == null )
|
||||
if ( b.getMyGrid() == null )
|
||||
{
|
||||
b.setGrid( a.getInternalGrid() );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( a.myGrid == null )
|
||||
if ( a.getMyGrid() == null )
|
||||
{
|
||||
GridPropagator gp = new GridPropagator( b.getInternalGrid() );
|
||||
a.beginVisit( gp );
|
||||
}
|
||||
else if ( b.myGrid == null )
|
||||
else if ( b.getMyGrid() == null )
|
||||
{
|
||||
GridPropagator gp = new GridPropagator( a.getInternalGrid() );
|
||||
b.beginVisit( gp );
|
||||
@@ -113,7 +115,7 @@ public class GridConnection implements IGridConnection, IPathItem
|
||||
|
||||
private boolean isNetworkABetter(GridNode a, GridNode b)
|
||||
{
|
||||
return a.myGrid.isImportant > b.myGrid.isImportant || a.myGrid.size() > b.myGrid.size();
|
||||
return a.getMyGrid().getPriority() > b.getMyGrid().getPriority() || a.getMyGrid().size() > b.getMyGrid().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user