Examples of DyeColor


Examples of crazypants.util.DyeColor

    int y = customTop;
    cb = new ColorButton(gui, ID_COLOR_BUTTON, x, y);
    cb.setToolTipHeading(Lang.localize("gui.conduit.redstone.signalColor"));
    if(con instanceof IInsulatedRedstoneConduit) {
      insCon = (IInsulatedRedstoneConduit) con;
      DyeColor sigCol = insCon.getSignalColor(gui.getDir());
      cb.setColorIndex(sigCol.ordinal());
    }
  }
View Full Code Here

Examples of crazypants.util.DyeColor

    return connectionsDirty;
  }

  @Override
  public boolean onBlockActivated(EntityPlayer player, RaytraceResult res, List<RaytraceResult> all) {
    DyeColor col = DyeColor.getColorFromDye(player.getCurrentEquippedItem());
    if(ConduitUtil.isProbeEquipped(player)) {
      if(!player.worldObj.isRemote) {
        new PacketConduitProbe().sendInfoMessage(player, this);
      }
      return true;
View Full Code Here

Examples of crazypants.util.DyeColor

    setClientStateDirty();
  }

  @Override
  public DyeColor getExtractionSignalColor(ForgeDirection dir) {
    DyeColor res = rsColors.get(dir);
    if(res == null) {
      res = DyeColor.RED;
    }
    return res;
  }
View Full Code Here

Examples of crazypants.util.DyeColor

    }
    if(mode == RedstoneControlMode.IGNORE) {
      return true;
    }

    DyeColor col = getExtractionSignalColor(dir);
    int signal = ConduitUtil.getInternalSignalForColor(getBundle(), col);
    int exSig = getExternalRedstoneSignalForDir(dir);
    boolean res;
    if(mode == RedstoneControlMode.OFF) {
      //if checking for no signal, must be no signal from both
View Full Code Here

Examples of crazypants.util.DyeColor

  public boolean onBlockActivated(EntityPlayer player, RaytraceResult res, List<RaytraceResult> all) {

    World world = getBundle().getEntity().getWorldObj();
    if(!world.isRemote) {

      DyeColor col = DyeColor.getColorFromDye(player.getCurrentEquippedItem());
      if(col != null && res.component != null) {
        setSignalColor(res.component.dir, col);
        return true;
      } else if(ConduitUtil.isToolEquipped(player)) {
View Full Code Here

Examples of crazypants.util.DyeColor

    //System.out.println("InsulatedRedstoneConduit.onInputChanged: ");
  }

  @Override
  public DyeColor getSignalColor(ForgeDirection dir) {
    DyeColor res = signalColors.get(dir);
    if(res == null) {
      return DyeColor.RED;
    }
    return res;
  }
View Full Code Here

Examples of crazypants.util.DyeColor

    Set<Signal> allSigs = network.getSignals();
    if(allSigs.isEmpty()) {
      return allSigs;
    }

    DyeColor col = getSignalColor(side);
    Set<Signal> result = new HashSet<Signal>();
    for (Signal signal : allSigs) {
      if(signal.color == col) {
        result.add(signal);
      }
View Full Code Here

Examples of crazypants.util.DyeColor

    if(signalColors.size() >= 0) {
      byte[] modes = new byte[6];
      int i = 0;
      for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
        DyeColor col = signalColors.get(dir);
        if(col != null) {
          modes[i] = (byte) col.ordinal();
        } else {
          modes[i] = -1;
        }
        i++;
      }
View Full Code Here

Examples of crazypants.util.DyeColor

    extractionColors.put(dir, col);
  }

  @Override
  public DyeColor getExtractionSignalColor(ForgeDirection dir) {
    DyeColor result = extractionColors.get(dir);
    if(result == null) {
      return DyeColor.RED;
    }
    return result;
  }
View Full Code Here

Examples of crazypants.util.DyeColor

    if(redstoneStateDirty) {
      externalRedstoneSignals.clear();
      redstoneStateDirty = false;
    }

    DyeColor col = getExtractionSignalColor(dir);
    int signal = ConduitUtil.getInternalSignalForColor(getBundle(), col);
   
    boolean res;
    if(mode == RedstoneControlMode.OFF) {
      //if checking for no signal, must be no signal from both
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.