Examples of IBlockFilter


Examples of buildcraft.core.robots.IBlockFilter

      } 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);
          }
        }));
      } else {
        startDelegateAI(new AIRobotGotoRandomGroundBlock(robot, 100, new IBlockFilter() {
          @Override
          public boolean matches(World world, int x, int y, int z) {
            Block b = robot.worldObj.getBlock(x, y, z);

            return b instanceof BlockDirt || b instanceof BlockGrass;
View Full Code Here

Examples of buildcraft.core.robots.IBlockFilter

    }

    if (!containItems) {
      startDelegateAI(new AIRobotGotoStationToLoad(robot, TNT_FILTER, null));
    } else {
      startDelegateAI(new AIRobotSearchRandomGroundBlock(robot, 100, new IBlockFilter() {
        @Override
        public boolean matches(World world, int x, int y, int z) {
          return y < world.getActualHeight() - flyingHeight && !world.isAirBlock(x, y, z);
        }
      }, robot.getZoneToWork()));
View Full Code Here

Examples of buildcraft.core.robots.IBlockFilter

    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

Examples of buildcraft.core.robots.IBlockFilter

        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

Examples of buildcraft.core.robots.IBlockFilter

        }
      }));
    } 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
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.