Pretty much all of security minus the gui.

and all the stuff I did that i forgot to comment.
This commit is contained in:
AlgorithmX2
2014-01-26 22:00:36 -06:00
parent bea039c7b5
commit 0f75db5e80
61 changed files with 2058 additions and 126 deletions
+7 -2
View File
@@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.EnumSet;
import net.minecraftforge.common.ForgeDirection;
import appeng.api.exceptions.FailedConnection;
import appeng.api.networking.GridFlags;
import appeng.api.networking.IGridConnection;
import appeng.api.networking.IGridNode;
@@ -11,6 +12,7 @@ import appeng.api.networking.events.MENetworkChannelsChanged;
import appeng.api.networking.pathing.IPathingGrid;
import appeng.api.util.IReadOnlyCollection;
import appeng.me.pathfinding.IPathItem;
import appeng.util.Platform;
import appeng.util.ReadOnlyCollection;
public class GridConnection implements IGridConnection, IPathItem
@@ -26,13 +28,16 @@ public class GridConnection implements IGridConnection, IPathItem
public int channelData = 0;
public GridConnection(IGridNode aNode, IGridNode bNode, ForgeDirection fromAtoB) {
public GridConnection(IGridNode aNode, IGridNode bNode, ForgeDirection fromAtoB) throws FailedConnection {
GridNode a = (GridNode) aNode;
GridNode b = (GridNode) bNode;
if ( Platform.securityCheck( a, b ) )
throw new FailedConnection();
if ( a == null || b == null )
throw new GridException( "Connection Forged Between null entnties." );
throw new GridException( "Connection Forged Between null enties." );
if ( a.hasConnection( b ) || b.hasConnection( a ) )
throw new GridException( "Connection already exists." );