Examples of IIcon


Examples of net.minecraft.util.IIcon

public class RenderWarpGate extends BlockRenderer implements ISimpleBlockRenderingHandler {

  @Override
  public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
    block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    IIcon topIcon = BlockWarpGate.icons[0];
    IIcon sideIcon = BlockWarpGate.icons[1];

    drawFaces(renderer, block, sideIcon, topIcon, sideIcon, sideIcon, sideIcon, sideIcon, false);
    GL11.glColor3f(1F, 1F, 1F);

    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
View Full Code Here

Examples of net.minecraft.util.IIcon

    public void renderItem(ItemRenderType type, ItemStack itemstack, Object... data) {
        GL11.glPushAttrib(GL11.GL_COLOR_BUFFER_BIT);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
        ItemInfusedSeeds item = (ItemInfusedSeeds) itemstack.getItem();
        IIcon icon = item.getIconIndex(itemstack);
        Aspect aspect = item.getAspect(itemstack);
        if (type == ItemRenderType.INVENTORY) {
            renderItemInInventory(itemstack, aspect, icon);
        } else if (type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
            renderItemInEquipped(itemstack, aspect, icon);
View Full Code Here

Examples of net.minecraft.util.IIcon

        GL11.glPopMatrix();
        break;
      }
      case EQUIPPED: {
        for (int i = 1; i >= 0; i--) {
          IIcon icon = ThaumicTinkerer.registry.getFirstItemFromClass(ItemPlacementMirror.class).getIconFromDamageForRenderPass(0, i);
          if (i == 0) {
            GL11.glEnable(GL11.GL_BLEND);
            GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
          }

          float f = icon.getMinU();
          float f1 = icon.getMaxU();
          float f2 = icon.getMinV();
          float f3 = icon.getMaxV();
          ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
        }
        GL11.glDisable(GL11.GL_BLEND);
        break;
      }
      case EQUIPPED_FIRST_PERSON: {
View Full Code Here

Examples of net.minecraft.util.IIcon

    doRenderItem(type, stack, item, fluid);
  }

  protected void doRenderItem(ItemRenderType type, ItemStack item, Item iconItem, FluidStack fluid) {

    IIcon icon = iconItem.getIcon(item, 0);
    IIcon mask = iconItem.getIcon(item, 1);
    boolean hasFluid = fluid != null;

    IIcon fluidIcon = hasFluid ? fluid.getFluid().getIcon(fluid) : mask;
    int fluidSheet = hasFluid ? fluid.getFluid().getSpriteNumber() : 0;
    int colorMult = hasFluid ? fluid.getFluid().getColor(fluid) : 0xFFFFFF;
    boolean isFloaty = hasFluid ? fluid.getFluid().getDensity(fluid) < 0 : false;

    if (fluid == null) {
      fluidIcon = Blocks.flowing_lava.getIcon(2, 0);
      fluidSheet = 0;
      colorMult = 0x3F3F3F;
    }
    GL11.glPushMatrix();

    Tessellator tessellator = Tessellator.instance;

    float iconMinX = icon.getMinU();
    float iconMaxX = icon.getMaxU();
    float iconMinY = icon.getMinV();
    float iconMaxY = icon.getMaxV();

    float maskMinX = mask.getMinU();
    float maskMaxX = mask.getMaxU();
    float maskMinY = mask.getMinV();
    float maskMaxY = mask.getMaxV();

    float fluidMinX = fluidIcon.getMinU();
    float fluidMaxX = fluidIcon.getMaxU();
    float fluidMinY = fluidIcon.getMinV();
    float fluidMaxY = fluidIcon.getMaxV();

    if (isFloaty && canFlip) {
      iconMaxY = icon.getMinV();
      iconMinY = icon.getMaxV();

      maskMaxY = mask.getMinV();
      maskMinY = mask.getMaxV();

      fluidMaxY = fluidIcon.getMinV();
      fluidMinY = fluidIcon.getMaxV();
    }
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glEnable(GL11.GL_ALPHA_TEST);
    OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
    int texture = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
View Full Code Here

Examples of net.minecraft.util.IIcon

      ClientHelper.minecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);

      int renderPass = 0;
      do {
        IIcon icon = item.getItem().getIcon(item, renderPass);
        if (icon != null) {
          Color color = new Color(item.getItem().getColorFromItemStack(item, renderPass));
          GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
          float f = icon.getMinU();
          float f1 = icon.getMaxU();
          float f2 = icon.getMinV();
          float f3 = icon.getMaxV();
          ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
          GL11.glColor3f(1F, 1F, 1F);
        }
        renderPass++;
      } while (renderPass < item.getItem().getRenderPasses(item.getItemDamage()));
      GL11.glPopMatrix();
View Full Code Here

Examples of net.minecraft.util.IIcon

    GL11.glScalef(1F, -1F, -1F);
    model.render();

    GL11.glRotatef(90F, 1F, 0F, 0F);
    GL11.glTranslatef(0F, 0F, -0.6F);
    IIcon icon = ((ItemHoverHarness) ConfigItems.itemHoverHarness).iconLightningRing;

    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < 2; j++) {
        GL11.glScalef(1F, -1F, 1F);
        UtilsFX.renderQuadCenteredFromIcon(false, icon, redstone / 15F * 0.7F + (redstone == 0 ? 0 : 0.4F), blue ? 0F : 1F, 0F, blue ? 1F : 0F, 225, GL11.GL_ONE_MINUS_SRC_ALPHA, 0.9F);
View Full Code Here

Examples of net.minecraft.util.IIcon

      bindTexture(TextureMap.locationItemsTexture);

      int renderPass = 0;
      do {
        IIcon icon = item.getItem().getIcon(item, renderPass);
        if (icon != null) {
          Color color = new Color(item.getItem().getColorFromItemStack(item, renderPass));
          GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
          float f = icon.getMinU();
          float f1 = icon.getMaxU();
          float f2 = icon.getMinV();
          float f3 = icon.getMaxV();
          ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
          GL11.glColor3f(1F, 1F, 1F);
        }
        renderPass++;
      } while (renderPass < item.getItem().getRenderPasses(item.getItemDamage()));
      GL11.glPopMatrix();
View Full Code Here

Examples of net.minecraft.util.IIcon

  public static void renderGuiTank(FluidStack fluid, int capacity, int amount, double x, double y, double zLevel, double width, double height) {
    if(fluid == null || fluid.getFluid() == null || fluid.amount <= 0) {
      return;
    }

    IIcon icon = fluid.getFluid().getStillIcon();
    if(icon == null) {
      icon = fluid.getFluid().getIcon();
      if(icon == null) {
        return;
      }
View Full Code Here

Examples of net.minecraft.util.IIcon

    setupVertices(bb, xForm);
    float minU;
    float maxU;
    float minV;
    float maxV;
    IIcon tex;

    Tessellator tessellator = Tessellator.instance;   

    tessellator.setNormal(0, 0, -1);
    if(brightnessPerSide != null) {
      float cm = brightnessPerSide[ForgeDirection.NORTH.ordinal()];
      tessellator.setColorOpaque_F(cm, cm, cm);
    }

    tex = faceTextures[ForgeDirection.NORTH.ordinal()];
    minU = tex.getMinU();
    maxU = tex.getMaxU();
    minV = tex.getMinV();
    maxV = tex.getMaxV();
    addVecWithUV(verts[1], minU, maxV);
    addVecWithUV(verts[0], maxU, maxV);
    addVecWithUV(verts[3], maxU, minV);
    addVecWithUV(verts[2], minU, minV);

    tessellator.setNormal(0, 0, 1);
    if(brightnessPerSide != null) {
      float cm = brightnessPerSide[ForgeDirection.SOUTH.ordinal()];
      tessellator.setColorOpaque_F(cm, cm, cm);
    }
    tex = faceTextures[ForgeDirection.SOUTH.ordinal()];
    minU = tex.getMinU();
    maxU = tex.getMaxU();
    minV = tex.getMinV();
    maxV = tex.getMaxV();
    addVecWithUV(verts[4], minU, maxV);
    addVecWithUV(verts[5], maxU, maxV);
    addVecWithUV(verts[6], maxU, minV);
    addVecWithUV(verts[7], minU, minV);

    tessellator.setNormal(0, 1, 0);
    if(brightnessPerSide != null) {
      float cm = brightnessPerSide[ForgeDirection.UP.ordinal()];
      tessellator.setColorOpaque_F(cm, cm, cm);
    }
    tex = faceTextures[ForgeDirection.UP.ordinal()];
    minU = tex.getMinU();
    maxU = tex.getMaxU();
    minV = tex.getMinV();
    maxV = tex.getMaxV();
    addVecWithUV(verts[6], minU, minV);
    addVecWithUV(verts[2], minU, maxV);
    addVecWithUV(verts[3], maxU, maxV);
    addVecWithUV(verts[7], maxU, minV);

    tessellator.setNormal(0, -1, 0);
    if(brightnessPerSide != null) {
      float cm = brightnessPerSide[ForgeDirection.DOWN.ordinal()];
      tessellator.setColorOpaque_F(cm, cm, cm);
    }
    tex = faceTextures[ForgeDirection.DOWN.ordinal()];
    minU = tex.getMinU();
    maxU = tex.getMaxU();
    minV = tex.getMinV();
    maxV = tex.getMaxV();
    addVecWithUV(verts[0], maxU, maxV);
    addVecWithUV(verts[1], minU, maxV);
    addVecWithUV(verts[5], minU, minV);
    addVecWithUV(verts[4], maxU, minV);

    tessellator.setNormal(1, 0, 0);
    if(brightnessPerSide != null) {
      float cm = brightnessPerSide[ForgeDirection.EAST.ordinal()];
      tessellator.setColorOpaque_F(cm, cm, cm);
    }
    tex = faceTextures[ForgeDirection.EAST.ordinal()];
    minU = tex.getMinU();
    maxU = tex.getMaxU();
    minV = tex.getMinV();
    maxV = tex.getMaxV();
    addVecWithUV(verts[2], minU, minV);
    addVecWithUV(verts[6], maxU, minV);
    addVecWithUV(verts[5], maxU, maxV);
    addVecWithUV(verts[1], minU, maxV);

    tessellator.setNormal(-1, 0, 0);
    if(brightnessPerSide != null) {
      float cm = brightnessPerSide[ForgeDirection.WEST.ordinal()];
      tessellator.setColorOpaque_F(cm, cm, cm);
    }
    tex = faceTextures[ForgeDirection.WEST.ordinal()];
    minU = tex.getMinU();
    maxU = tex.getMaxU();
    minV = tex.getMinV();
    maxV = tex.getMaxV();
    addVecWithUV(verts[0], minU, maxV);
    addVecWithUV(verts[4], maxU, maxV);
    addVecWithUV(verts[7], maxU, minV);
    addVecWithUV(verts[3], minU, minV);
  }
View Full Code Here

Examples of net.minecraft.util.IIcon

      IconUtil.addIconProvider(new IconUtil.IIconProvider() {

        @Override
        public void registerIcons(IIconRegister register) {
          //NB: textures re-used with permission from OpenBlocks to maintain look
          IIcon flowing = register.registerIcon("enderio:xpjuiceflowing");
          IIcon still = register.registerIcon("enderio:xpjuicestill");
          EnderIO.fluidXpJuice.setIcons(still, flowing);
        }

        @Override
        public int getTextureType() {
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.