Examples of DyeColor


Examples of crazypants.util.DyeColor

    } else if(guiButton.id == ID_PRIORITY_DOWN) {
      itemConduit.setOutputPriority(gui.getDir(), itemConduit.getOutputPriority(gui.getDir()) - 1);
      PacketHandler.INSTANCE.sendToServer(new PacketItemConduitFilter(itemConduit, gui.getDir()));
    } else if(guiButton.id == ID_CHANNEL) {

      DyeColor col = DyeColor.values()[channelB.getColorIndex()];     
      boolean input;
      if(isInputVisible()) {
        col = DyeColor.values()[channelB.getColorIndex()];
        itemConduit.setInputColor(gui.getDir(), col);
        input = true;
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

    return ConduitUtil.isRedstoneControlModeMet(getBundle(), mode, getExtractionSignalColor(dir));
  }

  @Override
  public DyeColor getInputColor(ForgeDirection dir) {
    DyeColor result = inputColors.get(dir);
    if(result == null) {
      return DyeColor.GREEN;
    }
    return result;
  }
View Full Code Here

Examples of crazypants.util.DyeColor

    return result;
  }

  @Override
  public DyeColor getOutputColor(ForgeDirection dir) {
    DyeColor result = outputColors.get(dir);
    if(result == null) {
      return DyeColor.GREEN;
    }
    return result;
  }
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);
    if(mode.isConditionMet(mode, signal) && mode != RedstoneControlMode.OFF) {
      return true;
    }
View Full Code Here

Examples of crazypants.util.DyeColor

      float worldLight) {
    super.renderEntity(conduitBundleRenderer, te, conduit, x, y, z, partialTick, worldLight);

    IItemConduit pc = (IItemConduit) conduit;
    for (ForgeDirection dir : conduit.getExternalConnections()) {
      DyeColor inChannel = null;
      DyeColor outChannel = null;
      IIcon inTex = null;
      IIcon outTex = null;
      boolean render = true;
      if(conduit.getConnectionMode(dir) == ConnectionMode.INPUT) {
        inTex = pc.getTextureForInputMode();
        inChannel = pc.getInputColor(dir);
      } else if(conduit.getConnectionMode(dir) == ConnectionMode.OUTPUT) {
        outTex = pc.getTextureForOutputMode();
        outChannel = pc.getOutputColor(dir);
      } else if(conduit.getConnectionMode(dir) == ConnectionMode.IN_OUT) {
        inTex = pc.getTextureForInOutMode(true);
        outTex = pc.getTextureForInOutMode(false);
        inChannel = pc.getInputColor(dir);
        outChannel = pc.getOutputColor(dir);
      } else {
        render = false;
      }

      if(render) {
        Offset offset = te.getOffset(IItemConduit.class, dir);
        ConnectionModeGeometry.renderModeConnector(dir, offset, pc.getTextureForInOutBackground(), true);

        if(inChannel != null) {
          Tessellator.instance.setColorOpaque_I(inChannel.getColor());
          ConnectionModeGeometry.renderModeConnector(dir, offset, inTex, false);
        }
        if(outChannel != null) {
          Tessellator.instance.setColorOpaque_I(outChannel.getColor());
          ConnectionModeGeometry.renderModeConnector(dir, offset, outTex, false);
        }
        Tessellator.instance.setColorOpaque_F(1f, 1f, 1f);
      }
    }
View Full Code Here

Examples of org.bukkit.DyeColor

        LogHelper.showInfo("cannonInteger", sender, ChatColor.RED);
        return true;
      }
    }
   
    DyeColor dye = null;

    try {
      for (DyeColor d : DyeColor.values()){
        String lower = d.name().toLowerCase();
        if (lower.equalsIgnoreCase(type)){
View Full Code Here

Examples of org.bukkit.DyeColor

        LogHelper.showInfo("cannonInteger", sender, ChatColor.RED);
        return true;
      }
    }
   
    DyeColor dye = null;

    try {
      for (DyeColor d : DyeColor.values()){
        String lower = d.name().toLowerCase();
        if (lower.equalsIgnoreCase(type)){
View Full Code Here

Examples of org.bukkit.DyeColor

                                LogHelper.showWarning("commandSignInvalid", player);
                                sign.getBlock().breakNaturally();
                            } else {
                                if (material == Material.WOOL || material == Material.INK_SACK){
                                    List<DyeColor> dyeMatches = ClosestMatches.dyeColor(data[1]);
                                    DyeColor dye = (dyeMatches.size() > 0 ? dyeMatches.get(0) : null);
                                    if (dye == null){
                                        LogHelper.showWarning("commandSignInvalid", player);
                                        sign.getBlock().breakNaturally();
                                        return;
                                    } else {
                                        e.setLine(1, WordUtils.capitalize(material.name().toLowerCase().replaceAll("_", ""))  + ":" + WordUtils.capitalize(dye.toString().toLowerCase().replaceAll("_", "")));
                                    }
                                } else {
                                    if (!data[1].matches(CommandsEX.intRegex)){
                                        LogHelper.showWarning("commandSignInvalid", player);
                                        sign.getBlock().breakNaturally();
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.