Fix some CME's in the powernet, and add a basic profiler to it, might add a command or someway to use this without enabling it in the code

This commit is contained in:
modmuss50 2016-10-03 20:54:05 +01:00
parent 796df6c055
commit 871edce960
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
3 changed files with 30 additions and 4 deletions

View file

@ -357,7 +357,10 @@ public abstract class CableMultipart extends Multipart
network = new TRPowerNet(getCableType());
network.addElement(this);
}
network.endpoints.clear();
for (Iterator<TRPowerNet.EnergyHandler> it = network.endpoints.iterator(); it.hasNext(); ) {
it.next();
it.remove();
}
for (EnumFacing dir : EnumFacing.VALUES) {
TileEntity te = getNeighbourTile(dir);
if (te != null && te instanceof IEnergyInterfaceTile) {