Package net.minecraft.util

Examples of net.minecraft.util.IIcon


      gui.getFontRenderer().drawString(autoExtractStr, left, top, ColorUtil.getRGB(Color.DARK_GRAY));
    }
  }

  private void renderGas(Gas 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


    renderFluidOutline(component, fluid, 1, 13f / 16f);
  }

  public static void renderFluidOutline(CollidableComponent component, FluidStack fluid, double scaleFactor, float outlineWidth) {
    //TODO: Should cache these vertices as relatively heavy weight to calc each frame
    IIcon texture = fluid.getFluid().getStillIcon();
    if(texture == null) {
      texture = fluid.getFluid().getIcon();
      if(texture == null) {
        return;
      }
View Full Code Here

    Tessellator tessellator = Tessellator.instance;

    calculateRatios((LiquidConduit) conduit);
    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) {

          tessellator.setColorOpaque_F(1, 1, 1);
          tex = conduit.getTransmitionTextureForState(component);

          BoundingBox[] cubes = toCubes(component.bound);
          for (BoundingBox cube : cubes) {
            drawSection(cube, tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV(), component.dir, true);
          }
        }
      }
    }
  }
View Full Code Here

    if(!conduit.hasConnectionMode(ConnectionMode.INPUT) && !conduit.hasConnectionMode(ConnectionMode.OUTPUT)) {
      return;
    }
    IPowerConduit pc = (IPowerConduit) 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

    if(!conduit.hasConnectionMode(ConnectionMode.INPUT) && !conduit.hasConnectionMode(ConnectionMode.OUTPUT)) {
      return;
    }
    AdvancedLiquidConduit pc = (AdvancedLiquidConduit) 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

    if(isNSEWUD(component.dir)) {
      AdvancedLiquidConduit lc = (AdvancedLiquidConduit) conduit;

      FluidStack fluid = lc.getFluidType();
      IIcon texture = null;
      if(fluid != null) {
        texture = fluid.getFluid().getStillIcon();
        if(texture == null) {
          texture = fluid.getFluid().getIcon();
        }
      }

      if(texture == null) {
        texture = lc.getNotSetEdgeTexture();
      }

      float scaleFactor = 0.75f;
      float xLen = Math.abs(component.dir.offsetX) == 1 ? 1 : scaleFactor;
      float yLen = Math.abs(component.dir.offsetY) == 1 ? 1 : scaleFactor;
      float zLen = Math.abs(component.dir.offsetZ) == 1 ? 1 : scaleFactor;

      BoundingBox cube = component.bound;
      BoundingBox bb = cube.scale(xLen, yLen, zLen);

      for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
        if(d != component.dir && d != component.dir.getOpposite()) {

          ForgeDirection vDir = RenderUtil.getVDirForFace(d);
          if(component.dir == ForgeDirection.UP || component.dir == ForgeDirection.DOWN) {
            vDir = RenderUtil.getUDirForFace(d);
          } else if((component.dir == ForgeDirection.NORTH || component.dir == ForgeDirection.SOUTH) && d.offsetY != 0) {
            vDir = RenderUtil.getUDirForFace(d);
          }

          float minU = texture.getMinU();
          float maxU = texture.getMaxU();
          float minV = texture.getMinV();
          float maxV = texture.getMaxV();

          float sideScale = Math.max(bb.sizeX(), bb.sizeY()) * 2 / 16f;
          sideScale = Math.max(sideScale, bb.sizeZ() * 2 / 16f);
          float width = Math.min(bb.sizeX(), bb.sizeY()) * 15f / 16f;

View Full Code Here

  @SideOnly(Side.CLIENT)
  @Override
  public boolean addHitEffects(World world, MovingObjectPosition target,
      EffectRenderer effectRenderer) {
    IIcon tex = null;

    TileConduitBundle cb = (TileConduitBundle)
        world.getTileEntity(target.blockX, target.blockY, target.blockZ);
    if(ConduitUtil.isSolidFacadeRendered(cb, Minecraft.getMinecraft().thePlayer)) {
      if(cb.getFacadeId() != null) {
View Full Code Here

  @Override
  @SideOnly(Side.CLIENT)
  public boolean addDestroyEffects(World world, int x, int y, int z, int
      meta, EffectRenderer effectRenderer) {
    IIcon tex = lastRemovedComponetIcon;
    byte b0 = 4;
    for (int j1 = 0; j1 < b0; ++j1) {
      for (int k1 = 0; k1 < b0; ++k1) {
        for (int l1 = 0; l1 < b0; ++l1) {
          double d0 = x + (j1 + 0.5D) / b0;
View Full Code Here

    if(!conduit.hasConnectionMode(ConnectionMode.INPUT) && !conduit.hasConnectionMode(ConnectionMode.OUTPUT)) {
      return;
    }
    GasConduit pc = (GasConduit) 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

    if(isNSEWUD(component.dir)) {
      GasConduit lc = (GasConduit) conduit;

      GasStack gas = lc.getGasType();
      IIcon texture = null;
      if(gas != null) {
        texture = gas.getGas().getIcon();
      }

      if(texture == null) {
        texture = lc.getNotSetEdgeTexture();
      }

      float scaleFactor = 0.75f;
      float xLen = Math.abs(component.dir.offsetX) == 1 ? 1 : scaleFactor;
      float yLen = Math.abs(component.dir.offsetY) == 1 ? 1 : scaleFactor;
      float zLen = Math.abs(component.dir.offsetZ) == 1 ? 1 : scaleFactor;

      BoundingBox cube = component.bound;
      BoundingBox bb = cube.scale(xLen, yLen, zLen);

      for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
        if(d != component.dir && d != component.dir.getOpposite()) {

          ForgeDirection vDir = RenderUtil.getVDirForFace(d);
          if(component.dir == ForgeDirection.UP || component.dir == ForgeDirection.DOWN) {
            vDir = RenderUtil.getUDirForFace(d);
          } else if((component.dir == ForgeDirection.NORTH || component.dir == ForgeDirection.SOUTH) && d.offsetY != 0) {
            vDir = RenderUtil.getUDirForFace(d);
          }

          float minU = texture.getMinU();
          float maxU = texture.getMaxU();
          float minV = texture.getMinV();
          float maxV = texture.getMaxV();

          float sideScale = Math.max(bb.sizeX(), bb.sizeY()) * 2 / 16f;
          sideScale = Math.max(sideScale, bb.sizeZ() * 2 / 16f);
          float width = Math.min(bb.sizeX(), bb.sizeY()) * 15f / 16f;

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.