Package net.minecraft.util

Examples of net.minecraft.util.IIcon


    if(!conduit.hasConnectionMode(ConnectionMode.INPUT) && !conduit.hasConnectionMode(ConnectionMode.OUTPUT)) {
      return;
    }
    EnderLiquidConduit pc = (EnderLiquidConduit) conduit;
    for (ForgeDirection dir : conduit.getExternalConnections()) {
      IIcon tex = null;
      if(conduit.getConnectionMode(dir) == ConnectionMode.INPUT) {
        tex = pc.getTextureForInputMode();
      } else if(conduit.getConnectionMode(dir) == ConnectionMode.OUTPUT) {
        tex = pc.getTextureForOutputMode();
      }
View Full Code Here


    Collection<CollidableComponent> components = conduit.getCollidableComponents();
    Tessellator tessellator = Tessellator.instance;

    transmissionScaleFactor = conduit.getTransmitionGeometryScale();

    IIcon tex;
    for (CollidableComponent component : components) {
      if(renderComponent(component)) {
        float selfIllum = Math.max(worldLight, conduit.getSelfIlluminationForState(component));
        if(isNSEWUD(component.dir) &&
            conduit.getTransmitionTextureForState(component) != null) {
View Full Code Here

            wireBounds.add(component.bound);
          }
        }

      } else if(ConduitUtil.getDisplayMode(player) == ConduitDisplayMode.ALL) {
        IIcon tex = EnderIO.blockConduitBundle.getConnectorIcon();
        CubeRenderer.render(component.bound, tex);
      }
    }

    //render these after the 'normal' conduits so help with proper blending
View Full Code Here

    tessellator.addTranslation(-(float) x, -(float) y, -(float) z);

  }

  private void renderExternalConnection(ForgeDirection dir) {
    IIcon tex = EnderIO.blockConduitBundle.getConnectorIcon();
    BoundingBox[] bbs = ConduitGeometryUtil.instance.getExternalConnectorBoundingBoxes(dir);
    for (BoundingBox bb : bbs) {
      CubeRenderer.render(bb, tex, true);
    }
  }
View Full Code Here

    }
  }

  private void renderFluid(Fluid f, int x, int y) {
    IIcon icon = f.getIcon();
    if(icon != null) {
      RenderUtil.bindBlockTexture();
      gui.drawTexturedModelRectFromIcon(x + 1, y + 1, icon, 16, 16);
    }
View Full Code Here

    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) {
View Full Code Here

            }

            tessellator.setColorOpaque_F(f1 * f, f1 * f2, f1 * f3);
        }

        IIcon icon = BlazeHopper.hopperIcon("hopper_outside");
        IIcon icon1 = BlazeHopper.hopperIcon("hopper_inside");
        f = 0.125F;

        if (par6)
        {
            tessellator.startDrawingQuads();
View Full Code Here

        tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
        int direction = BlockDirectional.getDirection(meta);
        int sizer = SaguaroBlock.func_72219_c(meta + 5);
        if (sizer > 4)
            sizer = 0;
        IIcon icon = block.icons[3];
        int offsetX = 4 + sizer * 2;
        int offsetY = 5 + sizer * 2;
        double d0 = 16.0D - offsetX;
        double d1 = 16.0D;
        double d2 = 4.0D;
        double d3 = 4.0D + offsetY;
        double d4 = icon.getInterpolatedU(d0);
        double d5 = icon.getInterpolatedU(d1);
        double d6 = icon.getInterpolatedV(d2);
        double d7 = icon.getInterpolatedV(d3);
        double d8 = 0.0D;
        double d9 = 0.0D;

        switch (direction)
        {
        case 0:
            d8 = 8.0D - offsetX / 2;
            d9 = 18.0D - offsetX;
            break;
        case 1:
            d8 = -2.0D;
            d9 = 8.0D - offsetX / 2;
            break;
        case 2:
            d8 = 8.0D - offsetX / 2;
            d9 = -2.0D;
            break;
        case 3:
            d8 = 18.0D - offsetX;
            d9 = 8.0D - offsetX / 2;
            /*case 4:
                d8 = 11.0D - (double)offsetX;
                d9 = 8.0D - (double)(offsetX / 2);*/
        }

        double d10 = x + d8 / 16.0D;
        double d11 = x + (d8 + offsetX) / 16.0D;
        double d12 = y + (12.0D - offsetY) / 16.0D;
        double d13 = y + 0.75D;
        double d14 = z + d9 / 16.0D;
        double d15 = z + (d9 + offsetX) / 16.0D;
        tessellator.addVertexWithUV(d10, d12, d14, d4, d7);
        tessellator.addVertexWithUV(d10, d12, d15, d5, d7);
        tessellator.addVertexWithUV(d10, d13, d15, d5, d6);
        tessellator.addVertexWithUV(d10, d13, d14, d4, d6);
        tessellator.addVertexWithUV(d11, d12, d15, d4, d7);
        tessellator.addVertexWithUV(d11, d12, d14, d5, d7);
        tessellator.addVertexWithUV(d11, d13, d14, d5, d6);
        tessellator.addVertexWithUV(d11, d13, d15, d4, d6);
        tessellator.addVertexWithUV(d11, d12, d14, d4, d7);
        tessellator.addVertexWithUV(d10, d12, d14, d5, d7);
        tessellator.addVertexWithUV(d10, d13, d14, d5, d6);
        tessellator.addVertexWithUV(d11, d13, d14, d4, d6);
        tessellator.addVertexWithUV(d10, d12, d15, d4, d7);
        tessellator.addVertexWithUV(d11, d12, d15, d5, d7);
        tessellator.addVertexWithUV(d11, d13, d15, d5, d6);
        tessellator.addVertexWithUV(d10, d13, d15, d4, d6);
        int i2 = offsetX;

        if (sizer >= 2)
        {
            i2 = offsetX - 1;
        }

        d4 = icon.getMinU();
        d5 = icon.getInterpolatedU(i2);
        d6 = icon.getMinV();
        d7 = icon.getInterpolatedV(i2);
        tessellator.addVertexWithUV(d10, d13, d15, d4, d7);
        tessellator.addVertexWithUV(d11, d13, d15, d5, d7);
        tessellator.addVertexWithUV(d11, d13, d14, d5, d6);
        tessellator.addVertexWithUV(d10, d13, d14, d4, d6);
        tessellator.addVertexWithUV(d10, d12, d14, d4, d6);
        tessellator.addVertexWithUV(d11, d12, d14, d5, d6);
        tessellator.addVertexWithUV(d11, d12, d15, d5, d7);
        tessellator.addVertexWithUV(d10, d12, d15, d4, d7);
        d4 = icon.getInterpolatedU(12.0D);
        d5 = icon.getMaxU();
        d6 = icon.getMinV();
        d7 = icon.getInterpolatedV(4.0D);
        d8 = 8.0D;
        d9 = 0.0D;
        double d16;

        switch (direction)
View Full Code Here

  protected abstract IIcon getProgressBarIcon();
  protected abstract ResourceLocation getResourceLocation();
 
  @Override
  protected void drawProgressBar(Tessellator tessellator, TextureManager renderEngine, int barMinX, int barMaxX, int barMinY, int barMaxY, int zLevel) {
    IIcon progressBarIcon = getProgressBarIcon();
    if(progressBarIcon == null) {
      return;
    }

    double minU = progressBarIcon.getMinU();
    double minV = progressBarIcon.getMinV();
    double maxU = progressBarIcon.getMaxU();
    double maxV = progressBarIcon.getMaxV();
   
    renderEngine.bindTexture(getResourceLocation());
   
    // Draw the bar in 16-pixel slices from the bottom up.
    for(int slicedBarY = barMaxY; slicedBarY > 0; slicedBarY -= 16) {
View Full Code Here

    setCreativeTab(BigReactors.TAB);
  }

  @Override
    public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
    IIcon icon = null;
    int metadata = blockAccess.getBlockMetadata(x,y,z);
   
    if(metadata == METADATA_CONTROLROD) {
      return getIcon(side, metadata);
    }
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.