Examples of EnumColor


Examples of buildcraft.api.core.EnumColor

    }

    @Override
    public void draw(GuiBuildCraft gui, int guiX, int guiY, int mouseX, int mouseY) {
      super.draw(gui, guiX, guiY, mouseX, mouseY);
      EnumColor color = colors.getCurrent();
      if (color != null) {
        gui.bindTexture(TextureMap.locationItemsTexture);
        gui.drawTexturedModelRectFromIcon(guiX + x + 2, guiY + y + 2, BuildCraftTransport.actionPipeColor[color.ordinal()].getIcon(), 16, 16);
      } else {
        gui.drawTexturedModalRect(guiX + x + 2, guiY + y + 2, u, v + h + h, 16, 16);
      }
    }
View Full Code Here

Examples of buildcraft.api.core.EnumColor

      }
      try {
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        DataOutputStream data = new DataOutputStream(bytes);
        data.writeByte(slot);
        EnumColor color = colors.getCurrent();
        data.writeByte(color == null ? 0 : color.ordinal() + 1);
        PacketGuiReturn pkt = new PacketGuiReturn(pipe.getContainer(), bytes.toByteArray());
        pkt.sendPacket();
      } catch (IOException ex) {
      }
    }
View Full Code Here

Examples of mekanism.api.EnumColor

  @Override
  public void getSubItems(Item item, CreativeTabs tabs, List list)
  {
    for(int i = 0; i < EnumColor.DYES.length; i++)
    {
      EnumColor color = EnumColor.DYES[i];

      if(color != null)
      {
        ItemStack stack = new ItemStack(this);
        stack.setItemDamage(i);
View Full Code Here

Examples of mekanism.api.EnumColor

      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

      int x = inputPosMap.get(i).xPos;
      int y = inputPosMap.get(i).yPos;

      EnumColor color = configurable.getEjector().getInputColor(ForgeDirection.getOrientation(i));

      if(color != null)
      {
        GL11.glColor4f(color.getColor(0), color.getColor(1), color.getColor(2), 1);
      }

      if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
      {
        drawTexturedModalRect(guiWidth + x, guiHeight + y, 176, 0, 14, 14);
View Full Code Here

Examples of mekanism.api.EnumColor

    for(int i = 0; i < inputPosMap.size(); i++)
    {
      int x = inputPosMap.get(i).xPos;
      int y = inputPosMap.get(i).yPos;

      EnumColor color = configurable.getEjector().getInputColor(ForgeDirection.getOrientation(i));

      if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
      {
        drawCreativeTabHoveringText(color != null ? color.getName() : MekanismUtils.localize("gui.none"), xAxis, yAxis);
      }
    }

    if(xAxis >= 80 && xAxis <= 96 && yAxis >= 49 && yAxis <= 65)
    {
View Full Code Here

Examples of mekanism.api.EnumColor

    if(type == 0)
    {
      int c = dataStream.readInt();

      EnumColor prev = color;

      if(c != -1)
      {
        color = TransporterUtils.colors.get(c);
      }
View Full Code Here

Examples of mekanism.api.EnumColor

  public void registerIcons(IIconRegister register) {}

  @Override
  public TMultiPart newPart(ItemStack item, EntityPlayer player, World world, BlockCoord pos, int side, Vector3 vHit)
  {
    EnumColor col = EnumColor.DYES[item.getItemDamage()];
    ForgeDirection orientation = getSideFromVector3(vHit.subtract(Vector3.center));
   
    BlockCoord pos1 = pos.copy().inset(orientation.getOpposite().ordinal());
   
    if(world.isSideSolid(pos1.x, pos1.y, pos1.z, orientation.getOpposite()))
View Full Code Here

Examples of mekanism.api.EnumColor

  }

  @Override
  public String getItemStackDisplayName(ItemStack stack)
  {
    EnumColor colour = EnumColor.DYES[stack.getItemDamage()];
    String colourName;
   
    if(colour == EnumColor.BLACK)
    {
      colourName = EnumColor.DARK_GREY + colour.getDyeName();
    }
    else {
      colourName = colour.getDyedName();
    }

    return colourName + " " + super.getItemStackDisplayName(stack);
  }
View Full Code Here

Examples of mekanism.api.EnumColor

  {
    TextureUtils.bindAtlas(0);
    CCRenderState.reset();
    CCRenderState.startDrawing();
    CCRenderState.hasColour = true;
    EnumColor c = EnumColor.DYES[metadata];

    Colour colour = new ColourRGBA(c.getColor(0), c.getColor(1), c.getColor(2), 1);
    Colour white = new ColourRGBA(1.0, 1.0, 1.0, 1.0);
   
    for(int i = 4; i < 5; i++)
    {
      frameModels[i].render(new IconTransformation(icon), new ColourMultiplier(white.rgba()));
View Full Code Here

Examples of mekanism.api.EnumColor

      GL11.glEnable(GL11.GL_BLEND);
      GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

      MekanismRenderer.glowOn();

      EnumColor c = tier.color;

      GL11.glPushMatrix();
      GL11.glScalef(0.4F, 0.4F, 0.4F);
      GL11.glColor4f(c.getColor(0), c.getColor(1), c.getColor(2), (float)(energized.getEnergy(item)/energized.getMaxEnergy(item)));
      GL11.glTranslatef(0, (float)Math.sin(Math.toRadians((MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 3)) / 7, 0);
      GL11.glRotatef((MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 4, 0, 1, 0);
      GL11.glRotatef(36F + (MekanismClient.ticksPassed + MekanismRenderer.getPartialTick()) * 4, 0, 1, 1);
      energyCore.render(0.0625F);
      GL11.glPopMatrix();
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.