diff --git a/src/minecraft/assemblyline/common/machine/command/CommandIdle.java b/src/minecraft/assemblyline/common/machine/command/CommandIdle.java index 06e95d49f..8515a1629 100644 --- a/src/minecraft/assemblyline/common/machine/command/CommandIdle.java +++ b/src/minecraft/assemblyline/common/machine/command/CommandIdle.java @@ -4,12 +4,25 @@ import assemblyline.common.machine.armbot.TileEntityArmbot; public class CommandIdle extends Command { + /** + * The amount of time in which the machine will idle. + */ + public int idleTime = 80; + protected boolean doTask() { /** * Randomly move the arm to simulate life in the arm if the arm is powered */ this.tileEntity.rotationPitch *= 0.98 * this.world.rand.nextFloat(); + + if (this.idleTime > 0) + { + this.idleTime--; + System.out.println("RESTING"); + return true; + } + return false; } diff --git a/src/minecraft/assemblyline/common/machine/command/CommandManager.java b/src/minecraft/assemblyline/common/machine/command/CommandManager.java index 15af0077a..16525cfbc 100644 --- a/src/minecraft/assemblyline/common/machine/command/CommandManager.java +++ b/src/minecraft/assemblyline/common/machine/command/CommandManager.java @@ -29,6 +29,7 @@ public class CommandManager while (iter.hasNext()) { task = iter.next(); + if (task.getTickInterval() > 0) { if (this.ticks % task.getTickInterval() == 0) @@ -38,6 +39,8 @@ public class CommandManager task.onTaskEnd(); iter.remove(); } + + break; } } }