From eb8d6cace2916a5ce60c490bac81effc9bfdb075 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 28 Mar 2013 07:45:13 -0400 Subject: [PATCH] Fix some minor logic derps in the energy pulser. Much better behaviour now. --- common/buildcraft/transport/EnergyPulser.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/common/buildcraft/transport/EnergyPulser.java b/common/buildcraft/transport/EnergyPulser.java index ff3e87eb..6f9ba2ff 100644 --- a/common/buildcraft/transport/EnergyPulser.java +++ b/common/buildcraft/transport/EnergyPulser.java @@ -18,21 +18,14 @@ public class EnergyPulser { } public void update() { - if (powerReceptor == null) + if (powerReceptor == null || !isActive || tick++ % 10 != 0) return; - if (isActive) + if (!singlePulse || !hasPulsed) { - tick++; - if (!singlePulse || !hasPulsed) { - if (tick % 10 == 0 || !hasPulsed) - { - powerReceptor.getPowerProvider().receiveEnergy(Math.min(1 << (pulseCount-1),64), ForgeDirection.WEST); - if (singlePulse) { - hasPulsed = true; - } - } - } + System.out.printf("Pulsing%d\n",Math.min(1 << (pulseCount-1),64)); + powerReceptor.getPowerProvider().receiveEnergy(Math.min(1 << (pulseCount-1),64), ForgeDirection.WEST); + hasPulsed = true; } }