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
+6 -4
View File
@@ -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