Only send energy to active writers
@@ -45,12 +45,14 @@ public class ReaderWriterHandlerForgeEnergy implements IReaderWriterHandler {
int toExtract = 0;
for (IWriter writer : channel.getWriters()) {
+ if (writer.canUpdate()) {
TileEntity tile = writer.getWorld().getTileEntity(writer.getPos().offset(writer.getDirection()));
if (tile != null && tile.hasCapability(CapabilityEnergy.ENERGY, writer.getDirection().getOpposite())) {
toExtract += tile.getCapability(CapabilityEnergy.ENERGY, writer.getDirection().getOpposite()).receiveEnergy(storage.extractEnergy(toSend, false), false);
}
}
+ }
storage.extractEnergy(toExtract, false);
}
