Package buildcraft.core.robots

Examples of buildcraft.core.robots.RobotRegistry


  }

  @Override
  public void actionActivate(IStatementContainer container, IStatementParameter[] parameters) {
    Pipe<?> pipe = ((Gate) container).pipe;
    RobotRegistry registry = RobotRegistry.getRegistry(pipe.getWorld());

    for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
      DockingStation station = pipe.container.getStation(d);

      if (station != null && station.robotTaking() != null) {
        EntityRobot robot = (EntityRobot) station.robotTaking();
        AIRobot ai = robot.getOverridingAI();

        if (ai != null) {
          continue;
        }

        DockingStation newStation = station;

        if (parameters[0] != null) {
          StatementParameterItemStack stackParam = (StatementParameterItemStack) parameters[0];
          ItemStack item = stackParam.getItemStack();

          if (item != null && item.getItem() instanceof ItemMapLocation) {
            BlockIndex index = ItemMapLocation.getBlockIndex(item);

            if (index != null) {
              ForgeDirection side = ItemMapLocation.getSide(item);
              DockingStation paramStation = (DockingStation)
                  registry.getStation(index.x,
                  index.y, index.z, side);

              if (paramStation != null) {
                newStation = paramStation;
              }
View Full Code Here

TOP

Related Classes of buildcraft.core.robots.RobotRegistry

Copyright © 2018 www.massapicom. 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.