Examples of IoMode


Examples of crazypants.enderio.machine.IoMode

    double scale = 0.88;
    BoundingBox pushPullBounds = BoundingBox.UNIT_CUBE.scale(scale, scale, scale);
    BoundingBox disabledBounds = BoundingBox.UNIT_CUBE.scale(1.01, 1.01, 1.01);
   
    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      IoMode mode = trans.getIoMode(dir);
      if(mode != null) {
        if(mode == IoMode.DISABLED) {
          rb.setRenderBounds(disabledBounds.minX, disabledBounds.minY, disabledBounds.minZ,
              disabledBounds.maxX, disabledBounds.maxY, disabledBounds.maxZ);
        } else {
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

    if(block instanceof AbstractMachineBlock<?>) {
      if(te != null && te instanceof AbstractMachineEntity) {
        AbstractMachineEntity machine = (AbstractMachineEntity) te;
        ForgeDirection side = accessor.getSide();
        IoMode mode = machine.getIoMode(side);
        currenttip.add(EnumChatFormatting.YELLOW
            + String.format(Lang.localize("gui.machine.side"), EnumChatFormatting.WHITE + Lang.localize("gui.machine.side." + side.name().toLowerCase())));
        currenttip.add(EnumChatFormatting.YELLOW + String.format(Lang.localize("gui.machine.ioMode"), mode.colorLocalisedName()));
      }
    }

    if(block instanceof IWailaInfoProvider) {
      IWailaInfoProvider info = (IWailaInfoProvider) block;
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

    TileEntity te = ba.getTileEntity(x, y, z);
    if(!(te instanceof TileCapacitorBank)) {
      return blockIcon;
    }
    TileCapacitorBank cb = (TileCapacitorBank) te;
    IoMode mode = cb.getIoMode(ForgeDirection.values()[side]);
    if(mode == null || mode == IoMode.NONE) {
      return blockIcon;
    }
    if(mode == IoMode.PULL) {
      return blockIconInput;
View Full Code Here

Examples of crazypants.enderio.machine.IoMode


    if(selection != null) {
      IconEIO ioIcon = null;
      //    INPUT
      IoMode mode = selection.config.getIoMode(selection.face);
      if(mode == IoMode.PULL) {
        ioIcon = IconEIO.INPUT_SMALL_INV;
      } else if(mode == IoMode.PUSH) {
        ioIcon = IconEIO.OUTPUT_SMALL_INV;
      } else if(mode == IoMode.PUSH_PULL) {
        ioIcon = IconEIO.INPUT_OUTPUT;
      } else if(mode == IoMode.DISABLED) {
        ioIcon = IconEIO.DISABLED;
      }

      y = vph - mc.fontRenderer.FONT_HEIGHT - 2;
      mc.fontRenderer.drawString(getLabelForMode(mode), 4, y, ColorUtil.getRGB(Color.white));
      if(ioIcon != null) {
        int w = mc.fontRenderer.getStringWidth(mode.getLocalisedName());
        double xd = (w - ioIcon.width)/2;
        xd = Math.max(0, w);
        xd /=2;
        xd += 4;
        xd /= scaledresolution.getScaleFactor();
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

  }

  @Override
  public IoMode toggleIoModeForFace(ForgeDirection faceHit) {
    IPowerInterface rec = getReceptorForFace(faceHit);
    IoMode curMode = getIoMode(faceHit);
    if(curMode == IoMode.PULL) {
      setIoMode(faceHit, IoMode.PUSH, true);
      return IoMode.PUSH;
    }
    if(curMode == IoMode.PUSH) {
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

  @Override
  public IoMode getIoMode(ForgeDirection face) {
    if(faceModes == null) {
      return IoMode.NONE;
    }
    IoMode res = faceModes.get(face);
    if(res == null) {
      return IoMode.NONE;
    }
    return res;
  }
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

  public boolean isOutputEnabled() {
    return getController().outputEnabled;
  }

  public boolean isOutputEnabled(ForgeDirection direction) {
    IoMode mode = getIoMode(direction);
    return mode == IoMode.PUSH || mode == IoMode.NONE && isOutputEnabled();
  }
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

  public boolean isInputEnabled() {
    return getController().inputEnabled;
  }

  public boolean isInputEnabled(ForgeDirection direction) {
    IoMode mode = getIoMode(direction);
    return mode == IoMode.PULL || mode == IoMode.NONE && isInputEnabled();
  }
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

    int numReceptors = masterReceptors.size();
    while (receptorIterator.hasNext() && canTransmit > 0 && appliedCount < numReceptors) {

      Receptor receptor = receptorIterator.next();
      IPowerInterface powerInterface = receptor.receptor;
      IoMode mode = receptor.mode;
      if(powerInterface != null
          && mode != IoMode.PULL && mode != IoMode.DISABLED
          && powerInterface.getMinEnergyReceived(receptor.fromDir.getOpposite()) <= canTransmit) {
        double used;
        if(receptor.receptor.getDelegate() instanceof IConduitBundle && !isCreative) {
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

      localReceptors.clear();
    }

    BlockCoord bc = new BlockCoord(this);
    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      IoMode mode = getIoMode(dir);
      if(mode != IoMode.DISABLED) {
        BlockCoord checkLoc = bc.getLocation(dir);
        TileEntity te = worldObj.getTileEntity(checkLoc.x, checkLoc.y, checkLoc.z);
        if(!(te instanceof TileCapacitorBank)) {
          IPowerInterface ph = PowerHandlerUtil.create(te);
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.