Transmitter networks now keep track of all connected sides of acceptors. This should fix many future bugs, and it will also allow me to implement a better caching system for Logistical Transporters.

This commit is contained in:
Aidan C. Brady committed 2014-08-15 16:21:58 -04:00
1 parent 73f23abc84
commit d3b5676e43
7 files changed
+215 -95

No files matched your search

@@ -64,9 +64,7 @@ public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwor
for(IInventory acceptor : ((Map<Coord4D, IInventory>)possibleAcceptors.clone()).values())
{
ForgeDirection side = acceptorDirections.get(acceptor);
if(side == null)
if(acceptorDirections.get(acceptor) == null || acceptorDirections.get(acceptor).isEmpty())
{
continue;
}
@@ -117,7 +115,7 @@ public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwor
if(side != null && acceptor != null && !(acceptor instanceof IGridTransmitter) && transmitter.canConnectToAcceptor(side, true))
{
possibleAcceptors.put(Coord4D.get((TileEntity)acceptor), acceptor);
acceptorDirections.put(acceptor, ForgeDirection.getOrientation(Arrays.asList(acceptors).indexOf(acceptor)));
addSide(Coord4D.get((TileEntity)acceptor), ForgeDirection.getOrientation(Arrays.asList(acceptors).indexOf(acceptor)));
}
}
}