示例#1
0
  protected void buildFrame() {

    powerProvider.configure(20, 25, 25, 25, MAX_ENERGY);
    if (powerProvider.useEnergy(25, 25, true) != 25) {
      return;
    }

    powerProvider.getTimeTracker().markTime(worldObj);

    if (builder == null) {
      builder = new EntityRobot(worldObj, box);
      worldObj.spawnEntityInWorld(builder);
    }

    if (builder.readyToBuild()) {
      builder.scheduleContruction(
          bluePrintBuilder.getNextBlock(worldObj, this), bluePrintBuilder.getContext());
    }
  }
示例#2
0
  @Override
  public void doWork() {
    if (CoreProxy.proxy.isRenderWorld(worldObj)) {
      return;
    }

    if (done) {
      return;
    }

    if (builderRobot != null && !builderRobot.readyToBuild()) {
      return;
    }

    if (powerProvider.useEnergy(25, 25, true) < 25) {
      return;
    }

    iterateBpt();

    if (bluePrintBuilder != null && !bluePrintBuilder.done) {
      if (!box.isInitialized()) {
        box.initialize(bluePrintBuilder);
      }

      if (builderRobot == null) {
        builderRobot = new EntityRobot(worldObj, box);
        worldObj.spawnEntityInWorld(builderRobot);
      }

      box.createLasers(worldObj, LaserKind.Stripes);

      builderRobot.scheduleContruction(
          bluePrintBuilder.getNextBlock(
              worldObj, new SurroundingInventory(worldObj, xCoord, yCoord, zCoord)),
          bluePrintBuilder.getContext());
    }
  }