Examples of PoweredTask


Examples of crazypants.enderio.machine.PoweredTask

    return logic.setDelayToMin(p_145842_1_) ? true : super.receiveClientEvent(p_145842_1_, p_145842_2_);
  }

  @Override
  protected IPoweredTask createTask(IMachineRecipe nextRecipe, float chance) {
    PoweredTask res = new PoweredTask(nextRecipe, chance, getRecipeInputs());

    int ticksDelay = TilePoweredSpawner.MIN_SPAWN_DELAY_BASE
        + (int) Math.round((TilePoweredSpawner.MAX_SPAWN_DELAY_BASE - TilePoweredSpawner.MIN_SPAWN_DELAY_BASE) * Math.random());
    if(capacitorType.ordinal() == 1) {
      ticksDelay /= 2;
    } else if(capacitorType.ordinal() == 2) {
      ticksDelay /= 4;
    }
    int powerPerTick = (int) getPowerUsePerTick();
    res.setRequiredEnergy(powerPerTick * ticksDelay);
    return res;
  }
View Full Code Here

Examples of crazypants.enderio.machine.PoweredTask

    }
  }

  @Override
  protected IPoweredTask createTask(IMachineRecipe nextRecipe, float chance) {
    PoweredTask res;
    useGrindingBall = false;
    if(gb != null) {
      useGrindingBall = !CrusherRecipeManager.getInstance().isExcludedFromBallBonus(getRecipeInputs());
      if(useGrindingBall) {
        res = new PoweredTask(nextRecipe, chance * gb.getChanceMultiplier(), getRecipeInputs());
        res.setRequiredEnergy(res.getRequiredEnergy() * gb.getPowerMultiplier());
      } else {
        res = new PoweredTask(nextRecipe, chance, getRecipeInputs());
      }
    } else {
      res = new PoweredTask(nextRecipe, chance, getRecipeInputs());
    }
    return res;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.