Examples of IOMode


Examples of crazypants.enderio.machine.IoMode

    return getIoMode(from) != IoMode.DISABLED;
  }

  @Override
  public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
    IoMode mode = getIoMode(from);
    if(mode == IoMode.DISABLED || mode == IoMode.PUSH) {
      return 0;
    }
    return getController().doReceiveEnergy(from, maxReceive, simulate);
  }
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

      if(gen != null && par1Block instanceof AbstractMachineBlock) {
        Vector3d offset = ForgeDirectionOffsets.offsetScaled(face, 0.01);
        Tessellator.instance.addTranslation((float) offset.x, (float) offset.y, (float) offset.z);

        IoMode mode = gen.getIoMode(face);
        IIcon tex = ((AbstractMachineBlock) par1Block).getOverlayIconForMode(mode);
        if(tex != null) {
          ccr.getCustomRenderBlocks().doDefaultRenderFace(face, par1Block, x, y, z, tex);
        }
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

      if(vat != null && par1Block instanceof AbstractMachineBlock) {
        Vector3d offset = ForgeDirectionOffsets.offsetScaled(face, 0.01);
        Tessellator.instance.addTranslation((float)offset.x, (float)offset.y, (float)offset.z);

        IoMode mode = vat.getIoMode(face);
        IIcon tex = ((AbstractMachineBlock)par1Block).getOverlayIconForMode(mode);
        if(tex != null) {
          ccr.getCustomRenderBlocks().doDefaultRenderFace(face,par1Block,x,y,z, tex);
        }
        Tessellator.instance.addTranslation(-(float)offset.x, -(float)offset.y, -(float)offset.z);
View Full Code Here

Examples of crazypants.enderio.machine.IoMode

    if(!hasRecieveChannel(channels, ChannelType.FLUID) || !redstoneCheckPassed) {
      return 0;
    }
    Map<ForgeDirection, IFluidHandler> handlers = getNeighbouringFluidHandlers();
    for (Entry<ForgeDirection, IFluidHandler> entry : handlers.entrySet()) {
      IoMode mode = getIoMode(entry.getKey());
      if(mode.canOutput()) {
        int res = entry.getValue().fill(entry.getKey().getOpposite(), resource, doFill);
        if(res > 0) {
          return res;
        }
      }
View Full Code Here

Examples of crazypants.enderio.machine.hypercube.TileHyperCube.IoMode

    privateChannelList.addSelectionListener(selectionListener);

  }

  private void updateIoButtons() {
    IoMode mode = cube.getModeForChannel(SubChannel.POWER);
    if(mode.isRecieveEnabled() || mode.isSendEnabled()) {
      powerB.setIcon(IconEIO.WRENCH_OVERLAY_POWER);
    } else {
      powerB.setIcon(IconEIO.WRENCH_OVERLAY_POWER_OFF);
    }
    powerB.setToolTip(Lang.localize("gui.trans.powerMode"), mode.getLocalisedName());

    mode = cube.getModeForChannel(SubChannel.FLUID);
    if(mode.isRecieveEnabled() || mode.isSendEnabled()) {
      fluidB.setIcon(IconEIO.WRENCH_OVERLAY_FLUID);
    } else {
      fluidB.setIcon(IconEIO.WRENCH_OVERLAY_FLUID_OFF);
    }
    fluidB.setToolTip(Lang.localize("gui.trans.fluidMode"), mode.getLocalisedName());

    mode = cube.getModeForChannel(SubChannel.ITEM);
    if(mode.isRecieveEnabled() || mode.isSendEnabled()) {
      itemB.setIcon(IconEIO.WRENCH_OVERLAY_ITEM);
    } else {
      itemB.setIcon(IconEIO.WRENCH_OVERLAY_ITEM_OFF);
    }
    itemB.setToolTip(Lang.localize("gui.trans.itemMode"), mode.getLocalisedName());
  }
View Full Code Here

Examples of crazypants.enderio.machine.hypercube.TileHyperCube.IoMode

  @Override
  protected void actionPerformed(GuiButton par1GuiButton) {

    if(par1GuiButton.id == FLUID_MODE_BUTTON_ID) {

      IoMode curMode = cube.getModeForChannel(SubChannel.FLUID);
      IoMode nextMode = curMode.next();
      cube.setModeForChannel(SubChannel.FLUID, nextMode);

      updateIoButtons();
      PacketHandler.INSTANCE.sendToServer(new PacketClientState(cube));

    } else if(par1GuiButton.id == POWER_MODE_BUTTON_ID) {

      IoMode curMode = cube.getModeForChannel(SubChannel.POWER);
      IoMode nextMode = curMode.next();
      cube.setModeForChannel(SubChannel.POWER, nextMode);

      updateIoButtons();
      PacketHandler.INSTANCE.sendToServer(new PacketClientState(cube));

    } else if(par1GuiButton.id == ITEM_MODE_BUTTON_ID) {

      IoMode curMode = cube.getModeForChannel(SubChannel.ITEM);
      IoMode nextMode = curMode.next();
      cube.setModeForChannel(SubChannel.ITEM, nextMode);

      updateIoButtons();
      PacketHandler.INSTANCE.sendToServer(new PacketClientState(cube));
View Full Code Here

Examples of crazypants.enderio.machine.hypercube.TileHyperCube.IoMode

    drawString(getFontRenderer(), Lang.localize("gui.trans.publicHeading"), x, y, rgb);

    x += 109;
    drawString(getFontRenderer(), Lang.localize("gui.trans.privateHeading"), x, y, rgb);

    IoMode fluidMode = cube.getModeForChannel(SubChannel.FLUID);
    IoMode powerMode = cube.getModeForChannel(SubChannel.POWER);
    IoMode itemMode = cube.getModeForChannel(SubChannel.ITEM);

    x = 163;
    if(itemMode.isRecieveEnabled()) {
      IconEIO.INPUT.renderIcon(guiLeft + x + 15, guiTop + 4 + 7, -15, -7, 0, true);
    }
    x += 18;
    if(powerMode.isRecieveEnabled()) {
      IconEIO.INPUT.renderIcon(guiLeft + x + 15, guiTop + 4 + 7, -15, -7, 0, true);
    }
    x += 18;
    if(fluidMode.isRecieveEnabled()) {
      IconEIO.INPUT.renderIcon(guiLeft + x + 15, guiTop + 4 + 7, -15, -7, 0, true);
    }

    x = 163;
    if(itemMode.isSendEnabled()) {
      IconEIO.OUTPUT.renderIcon(guiLeft + x, guiTop + 29, 15, 7, 0, true);
    }
    x += 18;
    if(powerMode.isSendEnabled()) {
      IconEIO.OUTPUT.renderIcon(guiLeft + x, guiTop + 29, 15, 7, 0, true);
View Full Code Here

Examples of crazypants.enderio.machine.hypercube.TileHyperCube.IoMode

      TileHyperCube hc = (TileHyperCube) te;

      SubChannel[] vals = SubChannel.values();
      for (int i = 0; i < vals.length; i++) {
        SubChannel sc = vals[i];
        IoMode mode = message.modes.get(i);
        hc.setModeForChannel(sc, mode);
      }

      hc.setChannel(message.selectedChannel);
View Full Code Here

Examples of org.apache.spark.network.util.IOMode

    return port;
  }

  private void init(int portToBind) {

    IOMode ioMode = IOMode.valueOf(conf.ioMode());
    EventLoopGroup bossGroup =
      NettyUtils.createEventLoop(ioMode, conf.serverThreads(), "shuffle-server");
    EventLoopGroup workerGroup = bossGroup;

    PooledByteBufAllocator allocator = new PooledByteBufAllocator(
View Full Code Here

Examples of org.apache.spark.network.util.IOMode

    this.context = Preconditions.checkNotNull(context);
    this.conf = context.getConf();
    this.clientBootstraps = Lists.newArrayList(Preconditions.checkNotNull(clientBootstraps));
    this.connectionPool = new ConcurrentHashMap<SocketAddress, TransportClient>();

    IOMode ioMode = IOMode.valueOf(conf.ioMode());
    this.socketChannelClass = NettyUtils.getClientChannelClass(ioMode);
    // TODO: Make thread pool name configurable.
    this.workerGroup = NettyUtils.createEventLoop(ioMode, conf.clientThreads(), "shuffle-client");
  }
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.