From 8b97bc7a2cbc725259b16384a1ef277e7bc414d0 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sun, 6 Mar 2022 19:02:36 +0100 Subject: [PATCH] Fixed accelerator injector ignoring local enabled state --- .../warpdrive/block/atomic/TileEntityAcceleratorCore.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/cr0s/warpdrive/block/atomic/TileEntityAcceleratorCore.java b/src/main/java/cr0s/warpdrive/block/atomic/TileEntityAcceleratorCore.java index b4395a65..6ef7cdde 100644 --- a/src/main/java/cr0s/warpdrive/block/atomic/TileEntityAcceleratorCore.java +++ b/src/main/java/cr0s/warpdrive/block/atomic/TileEntityAcceleratorCore.java @@ -239,7 +239,11 @@ public class TileEntityAcceleratorCore extends TileEntityAbstractEnergyCoreOrCon injectionTicks = injectionPeriodTicks; final int countInjectors = acceleratorSetup.keyInjectors.length; if (indexNextInjector < countInjectors) { - onInject(acceleratorSetup.mapInjectors.get(acceleratorSetup.keyInjectors[indexNextInjector])); + final Integer controlChannel = acceleratorSetup.keyInjectors[indexNextInjector]; + final AcceleratorControlParameter acceleratorControlParameter = mapControlParameters.get(controlChannel); + if (acceleratorControlParameter == null || acceleratorControlParameter.isEnabled) { + onInject(acceleratorSetup.mapInjectors.get(controlChannel)); + } } else { // invalid setup => force a reset rebootAccelerator(acceleratorSetup,false, true);