Skip to content

Commit 85e0e0c

Browse files
authored
Fix #548: Multiblock generators not losing active state when shape becomes invalid (#948)
1 parent 525cdec commit 85e0e0c

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/GeneratorMultiblockBlockEntity.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,16 @@ public final void tick() {
113113
link();
114114
if (allowNormalOperation) {
115115
if (this.redstoneControl.doAllowNormalOperation(this)) {
116-
if (redstoneControl.doAllowNormalOperation(this)) {
117-
long euProduced = fluidConsumer.getEuProduction(inventory.getFluidInputs(),
118-
inventory.getItemInputs(),
119-
insertEnergy(Long.MAX_VALUE, Simulation.SIMULATE));
120-
insertEnergy(euProduced, Simulation.ACT);
121-
isActiveComponent.updateActive(euProduced != 0, this);
122-
} else {
123-
isActiveComponent.updateActive(false, this);
124-
}
116+
long euProduced = fluidConsumer.getEuProduction(inventory.getFluidInputs(),
117+
inventory.getItemInputs(),
118+
insertEnergy(Long.MAX_VALUE, Simulation.SIMULATE));
119+
insertEnergy(euProduced, Simulation.ACT);
120+
isActiveComponent.updateActive(euProduced != 0, this);
125121
} else {
126122
isActiveComponent.updateActive(false, this);
127123
}
124+
} else {
125+
isActiveComponent.updateActive(false, this);
128126
}
129127
setChanged();
130128
}

0 commit comments

Comments
 (0)