Skip to content

Commit

Permalink
Merge branch 'master' into mc1.5
Browse files Browse the repository at this point in the history
Conflicts:
	common/buildcraft/transport/EnergyPulser.java
  • Loading branch information
cpw committed Mar 28, 2013
2 parents 4a8f165 + eb8d6ca commit 04be016
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions common/buildcraft/transport/EnergyPulser.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,14 @@ public EnergyPulser(IPowerReceptor receptor) {
}

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;
}
}

Expand Down

0 comments on commit 04be016

Please sign in to comment.