Package buildcraft.core.robots

Examples of buildcraft.core.robots.AIRobotSearchBlock


      } else {
        startDelegateAI(new AIRobotFetchAndEquipItemStack(robot, stackFilter));
      }
    } else {
      if (robot.getHeldItem().getItem() instanceof ItemSeeds) {
        startDelegateAI(new AIRobotSearchBlock(robot, new IBlockFilter() {
          @Override
          public boolean matches(World world, int x, int y, int z) {
            return BuildCraftAPI.isFarmlandProperty.get(world, x, y, z)
                && !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z))
                && isAirAbove(world, x, y, z);
View Full Code Here


        startDelegateAI(new AIRobotGotoSleep(robot));
      } else {
        startDelegateAI(new AIRobotUseToolOnBlock(robot, gotoBlock.blockFound));
      }
    } else if (ai instanceof AIRobotSearchBlock) {
      AIRobotSearchBlock gotoBlock = (AIRobotSearchBlock) ai;

      if (gotoBlock.blockFound != null
          && robot.getRegistry().take(new ResourceIdBlock(gotoBlock.blockFound), robot)) {

        if (blockFound != null) {
View Full Code Here

    if (tank != null && tank.amount > 0) {
      startDelegateAI(new AIRobotGotoStationAndUnloadFluids(robot, robot.getZoneToWork()));
    } else {
      updateFilter();

      startDelegateAI(new AIRobotSearchBlock(robot, new IBlockFilter() {

        @Override
        public boolean matches(World world, int x, int y, int z) {
          if (BuildCraftAPI.isFluidSource.get(world, x, y, z)
              && !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z))) {
View Full Code Here

        public boolean matches(ItemStack stack) {
          return stack != null && stack.getItem() instanceof ItemHoe;
        }
      }));
    } else {
      startDelegateAI(new AIRobotSearchBlock(robot, new IBlockFilter() {
        @Override
        public boolean matches(World world, int x, int y, int z) {
          return BuildCraftAPI.isDirtProperty.get(world, x, y, z)
              && !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z))
              && isAirAbove(world, x, y, z);
View Full Code Here

  }

  @Override
  public void delegateAIEnded(AIRobot ai) {
    if (ai instanceof AIRobotSearchBlock) {
      AIRobotSearchBlock searchAI = (AIRobotSearchBlock) ai;

      if (searchAI.blockFound != null
          && RobotRegistry.getRegistry(robot.worldObj).take(
              new ResourceIdBlock(searchAI.blockFound), robot)) {
View Full Code Here

        }
      }));
    } else {
      updateFilter();

      startDelegateAI(new AIRobotSearchBlock(robot, new IBlockFilter() {
        @Override
        public boolean matches(World world, int x, int y, int z) {
          if (isExpectedBlock(world, x, y, z) && !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z))) {
            return matchesGateFilter(world, x, y, z);
          } else {
View Full Code Here

TOP

Related Classes of buildcraft.core.robots.AIRobotSearchBlock

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.