use of micdoodle8.mods.galacticraft.api.transmission.tile.IConductor in project Galacticraft by micdoodle8.
the class EnergyNetwork method refreshAcceptors.
/**
* Refresh all energy acceptors in the network
*/
private void refreshAcceptors() {
this.connectedAcceptors.clear();
this.connectedDirections.clear();
this.refreshWithChecks();
try {
LinkedList<IConductor> conductorsCopy = new LinkedList<>();
conductorsCopy.addAll(this.conductors);
// (Chunk loading can change the network if new conductors are found)
for (IConductor conductor : conductorsCopy) {
EnergyUtil.setAdjacentPowerConnections((TileEntity) conductor, this.connectedAcceptors, this.connectedDirections);
}
} catch (Exception e) {
FMLLog.severe("GC Aluminium Wire: Error when testing whether another mod's tileEntity can accept energy.");
e.printStackTrace();
}
}
Aggregations