Package mekanism.api

Examples of mekanism.api.EnumColor


    if(tileEntity instanceof IInvConfiguration)
    {
      IInvConfiguration config = (IInvConfiguration)tileEntity;
      int tileSide = config.getOrientation();
      EnumColor configColor = config.getEjector().getInputColor(ForgeDirection.getOrientation(MekanismUtils.getBaseOrientation(side, tileSide)).getOpposite());

      if(config.getEjector().hasStrictInput() && configColor != null && configColor != color)
      {
        return itemStack;
      }
View Full Code Here


      bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCore.png"));

      MekanismRenderer.blendOn();
      MekanismRenderer.glowOn();

      EnumColor c = tileEntity.tier.color;


      GL11.glPushMatrix();
      GL11.glScalef(0.4F, 0.4F, 0.4F);
      GL11.glColor4f(c.getColor(0), c.getColor(1), c.getColor(2), (float) (tileEntity.getEnergy() / tileEntity.getMaxEnergy()));
      GL11.glTranslatef(0, (float) Math.sin(Math.toRadians((MekanismClient.ticksPassed + partialTick) * 3)) / 7, 0);
      GL11.glRotatef((MekanismClient.ticksPassed + partialTick) * 4, 0, 1, 0);
      GL11.glRotatef(36F + (MekanismClient.ticksPassed + partialTick) * 4, 0, 1, 1);
      core.render(0.0625F);
      GL11.glPopMatrix();
View Full Code Here

    if(!force && tileEntity instanceof IInvConfiguration)
    {
      IInvConfiguration config = (IInvConfiguration)tileEntity;
      int tileSide = config.getOrientation();
      EnumColor configColor = config.getEjector().getInputColor(ForgeDirection.getOrientation(MekanismUtils.getBaseOrientation(side, tileSide)).getOpposite());

      if(config.getEjector().hasStrictInput() && configColor != null && configColor != color)
      {
        return false;
      }
View Full Code Here

  }

  @Override
  public String getItemStackDisplayName(ItemStack stack)
  {
    EnumColor colour = EnumColor.DYES[stack.getItemDamage()&15];
    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

  }

  @SideOnly(Side.CLIENT)
  public int getColorFromItemStack(ItemStack stack, int par2)
  {
    EnumColor colour = EnumColor.DYES[stack.getItemDamage()&15];
    return (int)(colour.getColor(0)*255) << 16 | (int)(colour.getColor(1)*255) << 8 | (int)(colour.getColor(2)*255);
  }
 
View Full Code Here

  }

  @Override
  public int getRenderColor(int meta)
  {
    EnumColor colour = EnumColor.DYES[meta];
    return (int)(colour.getColor(0)*255) << 16 | (int)(colour.getColor(1)*255) << 8 | (int)(colour.getColor(2)*255);

  }
 
View Full Code Here

TOP

Related Classes of mekanism.api.EnumColor

Copyright © 2018 www.massapicom. 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.