Package net.minecraft.util

Examples of net.minecraft.util.IIcon


    // Calculate UV coords for each face.
    double[] u = {0D, 0D, 16D, 16D};
    double[] v = {0D, 16D, 16D, 0D};

    IIcon IIcon = BigReactors.blockTurbineRotorPart.getRotorConnectorIcon();
    for(int i = 0; i < 4; i++) {
      u[i] = IIcon.getInterpolatedU(u[i]);
      v[i] = IIcon.getInterpolatedV(v[i]);
    }
   
    // Element buffer, which of these do we draw?
    int[][] quads;
    if(rotorDir.offsetX != 0 || (bladeDir.offsetX != 0 && rotorDir.offsetY != 0)) {
View Full Code Here


            int capacity = reactor.getCapacity();
            if(capacity > 0 && totalFluid > 0) {
              // Okay, we're connected and have some kind of fluid inside. Let's do this.
                  float fluidColumnOffsetFromCenter = -1f;
                  float red, green, blue;
                  IIcon iconSide, iconBottom;
                  iconSide = iconBottom = null;
                  red = green = blue = 1f;

              iconSide = BigReactors.fluidFuelColumn.getFlowingIcon();
              iconBottom = BigReactors.fluidFuelColumn.getStillIcon();
View Full Code Here

    return new PageCraftingRecipe(key, recipe);
  }

  @Override
  public IIcon getSubTileIconForName(String name) {
    IIcon icon = (ConfigHandler.altFlowerTextures ? BlockSpecialFlower.iconsAlt : BlockSpecialFlower.icons).get(name);
    return icon == null ? Blocks.red_flower.getIcon(0, 0) : icon;
  }
View Full Code Here

    return icon == null ? Blocks.red_flower.getIcon(0, 0) : icon;
  }

  @Override
  public void registerBasicSignatureIcons(String name, IIconRegister register) {
    IIcon normal = IconHelper.forName(register, name);
    IIcon alt = IconHelper.forName(register, BlockModFlower.ALT_DIR + "/" + name);
    BlockSpecialFlower.icons.put(name, normal);
    BlockSpecialFlower.iconsAlt.put(name, alt == null ? normal : alt);
  }
View Full Code Here

      renderItemAtInputPos(gui, i, (ItemStack) input);
      i++;
    }

    IIcon portalIcon = BlockAlfPortal.portalTex;
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    RenderItem.getInstance().renderIcon(gui.getLeft() + 22, gui.getTop() + 36, portalIcon, 48, 48);
  }
View Full Code Here

     * Cleaned-up snip of ItemRenderer.renderItem() -- meant to render 2D items as equipped.
     * @param item - ItemStack to render
     */
    public static void renderItem(ItemStack item)
    {
    IIcon icon = item.getItem().getIconIndex(item);
    TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();

        if(icon == null)
        {
            GL11.glPopMatrix();
            return;
        }

        texturemanager.bindTexture(texturemanager.getResourceLocation(item.getItemSpriteNumber()));
        Tessellator tessellator = Tessellator.instance;
       
        float minU = icon.getMinU();
        float maxU = icon.getMaxU();
        float minV = icon.getMinV();
        float maxV = icon.getMaxV();
       
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glTranslatef(0.0F, -0.3F, 0.0F);
       
        GL11.glScalef(1.5F, 1.5F, 1.5F);
        GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
        GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
       
        RenderManager.instance.itemRenderer.renderItemIn2D(tessellator, maxU, minV, minU, maxV, icon.getIconWidth(), icon.getIconHeight(), 0.0625F);

        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    }
View Full Code Here

  }

  public void renderSide(ForgeDirection side, PartSidedPipe transmitter)
  {
    boolean connected = PartTransmitter.connectionMapContainsSide(transmitter.getAllCurrentConnections(), side);
    IIcon renderIcon = transmitter.getIconForSide(side);

    Colour c = null;

    if(transmitter.getRenderColor() != null)
    {
View Full Code Here

  public void renderSide(ForgeDirection side, TransmitterType type)
  {
    boolean out = side == ForgeDirection.UP || side == ForgeDirection.DOWN;

    IIcon renderIcon = out ? type.getSideIcon() : type.getCenterIcon();

    renderPart(renderIcon, getItemModel(side, type), 0, 0, 0, null);
  }
View Full Code Here

    if(cachedOverlays.containsKey(side) && cachedOverlays.get(side).containsKey(mode))
    {
      return cachedOverlays.get(side).get(mode);
    }

    IIcon icon = null;

    switch(mode)
    {
      case 0:
        icon = Items.gunpowder.getIcon(new ItemStack(Items.gunpowder), 0);
View Full Code Here

        this.icons = icons;
    }

    @Override
    public void apply(UV uv) {
        IIcon icon = icons[uv.tex % icons.length];
        uv.u = icon.getInterpolatedU(uv.u * 16);
        uv.v = icon.getInterpolatedV(uv.v * 16);
    }
View Full Code Here

TOP

Related Classes of net.minecraft.util.IIcon

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.