Package buildcraft.transport.gates

Examples of buildcraft.transport.gates.ActionIterator


  public IStatementParameter createParameter(int index) {
    return new StatementParameterItemStack();
  }

  public static boolean isForbidden(DockingStation station, EntityRobotBase robot) {
    for (StatementSlot s : new ActionIterator(station.getPipe().pipe)) {
      if (s.statement instanceof ActionStationForbidRobot) {
        if (ActionStationForbidRobot.isForbidden(s, robot)) {
          return true;
        }
      }
View Full Code Here


  }

  public static Collection<ItemStack> getGateFilterStacks(IDockingStation station) {
    ArrayList<ItemStack> result = new ArrayList<ItemStack>();

    for (StatementSlot slot : new ActionIterator(((DockingStation) station).getPipe().pipe)) {
      if (slot.statement instanceof ActionRobotFilter) {
        for (IStatementParameter p : slot.parameters) {
          if (p != null && p instanceof StatementParameterItemStack) {
            StatementParameterItemStack param = (StatementParameterItemStack) p;
            ItemStack stack = param.getItemStack();
View Full Code Here

  public static boolean canInteractWithItem(DockingStation station, IStackFilter filter, Class<?> actionClass) {
    boolean actionFound = false;

    Pipe pipe = station.getPipe().pipe;

    for (StatementSlot s : new ActionIterator(pipe)) {
      if (actionClass.isAssignableFrom(s.statement.getClass())) {
        StatementParameterStackFilter param = new StatementParameterStackFilter(s.parameters);

        if (!param.hasFilter() || param.matches(filter)) {
          actionFound = true;
View Full Code Here

  public static boolean canInteractWithFluid(DockingStation station, IFluidFilter filter, Class<?> actionClass) {
    boolean actionFound = false;
    Pipe pipe = station.getPipe().pipe;

    for (StatementSlot s : new ActionIterator(pipe)) {
      if (actionClass.isAssignableFrom(s.statement.getClass())) {
        StatementParameterStackFilter param = new StatementParameterStackFilter(s.parameters);

        if (!param.hasFilter()) {
          actionFound = true;
View Full Code Here

  public void updateFilter() {
    fluidFilter.clear();

    DockingStation station = (DockingStation) robot.getLinkedStation();

    for (StatementSlot slot : new ActionIterator(station.getPipe().pipe)) {
      if (slot.statement instanceof ActionRobotFilter) {
        for (IStatementParameter p : slot.parameters) {
          if (p != null && p instanceof StatementParameterItemStack) {
            StatementParameterItemStack param = (StatementParameterItemStack) p;
            ItemStack stack = param.getItemStack();
View Full Code Here

      for (IInvSlot robotSlot : InventoryIterator.getIterable(robot, ForgeDirection.UNKNOWN)) {
        if (robotSlot.getStackInSlot() == null) {
          continue;
        }

        for (StatementSlot s : new ActionIterator(pipe)) {
          if (s.statement instanceof ActionStationInputItems) {
            if (((ActionStationInputItems) s.statement).insert(station, (EntityRobot) robot, s, robotSlot, false)) {
              return true;
            }
          }
View Full Code Here

      if (!station.index().nextTo(new BlockIndex(requested.requester))) {
        return false;
      }

      for (StatementSlot s : new ActionIterator(pipe)) {
        if (s.statement instanceof ActionStationRequestItemsMachine) {
          actionFound = true;
        }
      }
View Full Code Here

  }

  @Override
  public IZone getZoneToWork() {
    if (linkedDockingStation instanceof DockingStation) {
      for (StatementSlot s : new ActionIterator(((DockingStation) linkedDockingStation).getPipe().pipe)) {
        if (s.statement instanceof ActionRobotWorkInArea) {
          IZone zone = ActionRobotWorkInArea.getArea(s);

          if (zone != null) {
            return zone;
View Full Code Here

  private StackRequest getOrderFromRequestingAction(DockingStation station) {
    boolean actionFound = false;

    Pipe pipe = station.getPipe().pipe;

    for (StatementSlot s : new ActionIterator(pipe)) {
      if (s.statement instanceof ActionStationRequestItems) {
        for (IStatementParameter p : s.parameters) {
          StatementParameterItemStack param = (StatementParameterItemStack) p;

          if (param != null && !isBlacklisted(param.getItemStack())) {
View Full Code Here

    blockFilter.clear();
    metaFilter.clear();

    DockingStation station = (DockingStation) robot.getLinkedStation();

    for (StatementSlot slot : new ActionIterator(station.getPipe().pipe)) {
      if (slot.statement instanceof ActionRobotFilter) {
        for (IStatementParameter p : slot.parameters) {
          if (p != null && p instanceof StatementParameterItemStack) {
            StatementParameterItemStack param = (StatementParameterItemStack) p;
            ItemStack stack = param.getItemStack();
View Full Code Here

TOP

Related Classes of buildcraft.transport.gates.ActionIterator

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.