Fixed Controller always using energy, even when disabled with redstone. Fixes #2505

This commit is contained in:
raoulvdberge
2020-06-27 14:04:23 +02:00
parent 0ec0cc284b
commit 8690f0b90e
2 changed files with 7 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
### 1.8.7
- Fixed Regulator mode item and fluid counts not saving properly (raoulvdberge)
- Fixed Wireless Crafting Monitor not closing properly (raoulvdberge)
- Fixed Controller always using energy, even when disabled with redstone (raoulvdberge)
### 1.8.6
- Fixed Constructor duplication bug (Darkere)

View File

@@ -525,7 +525,12 @@ public class Network implements INetwork, IRedstoneConfigurable {
}
private void updateEnergyUsage() {
int usage = redstoneMode.isEnabled(world, pos) ? RS.SERVER_CONFIG.getController().getBaseUsage() : 0;
if (!redstoneMode.isEnabled(world, pos)) {
this.lastEnergyUsage = 0;
return;
}
int usage = RS.SERVER_CONFIG.getController().getBaseUsage();
for (INetworkNode node : nodeGraph.all()) {
if (node.isActive()) {