_energyStored += mjGained;
energyRequired -= mjGained;
}
}
ElectricityPack powerRequested = new ElectricityPack(energyRequired * wPerEnergy / getVoltage(), getVoltage());
ElectricityPack powerPack = ElectricityNetworkHelper.consumeFromMultipleSides(this, powerRequested);
_ueBuffer += powerPack.getWatts();
int energyFromUE = Math.min(_ueBuffer / wPerEnergy, energyRequired);
_energyStored += energyFromUE;
energyRequired -= energyFromUE;
_ueBuffer -= (energyFromUE * wPerEnergy);